:root {
    --ink: #102c27;
    --ink-deep: #08241f;
    --ink-soft: #1a4a40;
    --paper: #f5f0e6;
    --paper-deep: #ebe3d4;
    --cream: #fffdf8;
    --gold: #c9a45b;
    --gold-dark: #9e7937;
    --sage: #80988d;
    --muted: #65736e;
    --line: #ddd5c5;
    --danger: #8c3d38;
    --shadow: 0 22px 60px rgba(13, 48, 41, .12);
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --arabic: 'KFGQPC Uthman Taha Naskh', 'Noto Naskh Arabic', 'Traditional Arabic', 'Amiri', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
body::selection { color: var(--cream); background: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button, input, textarea { font: inherit; }
.container-xl { max-width: 1240px; }
.container-lg { max-width: 1040px; }
.container-md { max-width: 820px; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .75rem 1rem; background: white; border: 2px solid var(--gold); }
.skip-link:focus { top: 1rem; }
.section-space { padding: 6.5rem 0; }
.section-kicker { display: block; margin-bottom: 1rem; color: var(--gold-dark); font-size: .7rem; font-weight: 800; letter-spacing: .19em; }
.section-kicker.light { color: #e6c985; }
.section-heading { margin-bottom: 2rem; }
.section-heading h2, .split-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.04em; }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.text-link { display: inline-flex; align-items: center; gap: .65rem; padding-bottom: .2rem; border-bottom: 1px solid var(--gold); color: var(--ink); font-weight: 750; }
.text-link svg { transition: transform .2s ease; }
.text-link:hover svg { transform: translateX(4px); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; border-radius: 6px; font-weight: 750; }
.btn-lg { padding: .95rem 1.35rem; font-size: 1rem; }
.btn-sm { padding: .6rem .95rem; }
.btn-gold { color: var(--ink-deep); background: var(--gold); border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(201, 164, 91, .2); }
.btn-gold:hover, .btn-gold:focus { color: var(--ink-deep); background: #d8b86f; border-color: #d8b86f; }
.btn-ink { color: var(--cream); background: var(--ink); border: 1px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus { color: white; background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-quiet { color: var(--ink); background: transparent; border: 1px solid rgba(16, 44, 39, .25); }
.btn-quiet:hover { background: rgba(16, 44, 39, .05); border-color: var(--ink); }
.btn-outline-light { color: var(--cream); border-color: rgba(255, 255, 255, .38); }
.btn-outline-light:hover { color: var(--ink); background: var(--cream); border-color: var(--cream); }
.btn.disabled { pointer-events: none; opacity: .35; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(245, 240, 230, .94); border-bottom: 1px solid rgba(16, 44, 39, .1); backdrop-filter: blur(16px); }
.site-header .navbar { min-height: 78px; padding: .65rem 0; }
.navbar-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); }
.navbar-brand img { display: block; }
.navbar-brand span { display: flex; flex-direction: column; line-height: .92; }
.navbar-brand strong { font-family: var(--serif); font-size: 1.1rem; letter-spacing: -.02em; }
.navbar-brand small { margin-top: .27rem; color: var(--gold-dark); font-size: .58rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.navbar-nav { gap: .3rem; }
.navbar-nav .nav-link { position: relative; padding: .75rem .9rem !important; color: #3d554f; font-size: .88rem; font-weight: 680; }
.navbar-nav .nav-link::after { position: absolute; right: .9rem; bottom: .48rem; left: .9rem; height: 1px; content: ''; background: var(--gold); transform: scaleX(0); transition: transform .2s ease; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--ink); }
.navbar-nav .nav-link.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: .8rem; }
.nav-signin { font-size: .88rem; font-weight: 700; }
.icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(16, 44, 39, .18); border-radius: 50%; }
.icon-button:hover { background: white; }
.navbar-toggler { border-color: rgba(16, 44, 39, .18); }
.flash-wrap { position: fixed; top: 88px; right: 0; left: 0; z-index: 1020; pointer-events: none; }
.flash-wrap .alert { max-width: 680px; margin: 0 auto; border: 0; border-left: 4px solid currentColor; box-shadow: var(--shadow); pointer-events: auto; }

/* Home hero */
.hero-section { position: relative; overflow: hidden; min-height: 760px; color: var(--cream); background: var(--ink-deep); }
.hero-pattern, .guide-hero-pattern, .auth-pattern { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(30deg, transparent 24%, rgba(230, 201, 133, .35) 25%, rgba(230, 201, 133, .35) 26%, transparent 27%, transparent 74%, rgba(230, 201, 133, .35) 75%, rgba(230, 201, 133, .35) 76%, transparent 77%), linear-gradient(150deg, transparent 24%, rgba(230, 201, 133, .25) 25%, rgba(230, 201, 133, .25) 26%, transparent 27%, transparent 74%, rgba(230, 201, 133, .25) 75%, rgba(230, 201, 133, .25) 76%, transparent 77%); background-size: 84px 146px; }
.hero-section::after { position: absolute; right: -100px; bottom: -260px; width: 680px; height: 680px; content: ''; border: 1px solid rgba(201, 164, 91, .25); border-radius: 50%; box-shadow: 0 0 0 80px rgba(201, 164, 91, .035), 0 0 0 160px rgba(201, 164, 91, .025); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 6rem; align-items: center; min-height: 760px; padding-top: 5rem; padding-bottom: 7rem; }
.eyebrow { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.8rem; color: #e6c985; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { width: 36px; height: 1px; background: var(--gold); }
.hero-copy h1 { max-width: 720px; margin: 0 0 1.7rem; font-family: var(--serif); font-size: clamp(3.7rem, 6vw, 6rem); font-weight: 500; line-height: .98; letter-spacing: -.055em; }
.hero-copy h1 em { color: #e6c985; font-weight: 400; }
.hero-lead { max-width: 625px; margin-bottom: 2rem; color: #cedbd6; font-size: 1.12rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-actions .btn-quiet { color: var(--cream); border-color: rgba(255, 255, 255, .28); }
.trust-line { display: flex; gap: 2.7rem; margin-top: 3.3rem; }
.trust-line div { display: flex; flex-direction: column; }
.trust-line strong { color: var(--cream); font-family: var(--serif); font-size: 1.65rem; font-weight: 500; }
.trust-line span { color: #9fb2ab; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-reader { position: relative; padding: 2rem 2.2rem 1.5rem; color: var(--ink); background: var(--cream); border: 1px solid rgba(201, 164, 91, .45); box-shadow: 24px 26px 0 rgba(201, 164, 91, .1), var(--shadow); transform: rotate(1deg); }
.hero-reader::before, .hero-reader::after { position: absolute; width: 38px; height: 38px; content: ''; border-style: solid; border-color: var(--gold); }
.hero-reader::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.hero-reader::after { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }
.reader-topbar { display: flex; align-items: center; gap: .9rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.reader-topbar .seal { display: grid; width: 44px; height: 44px; place-items: center; font-family: var(--arabic); border: 1px solid var(--gold); transform: rotate(45deg); }
.reader-topbar .seal::first-letter { transform: rotate(-45deg); }
.reader-topbar div { display: flex; flex-direction: column; }
.reader-topbar small { color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .15em; }
.reader-topbar strong { font-family: var(--serif); font-size: 1.15rem; }
.source-pill { margin-left: auto; padding: .4rem .65rem; color: #386559; background: #e3eee9; border: 1px solid #bed5cc; border-radius: 3px; font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.reader-ornament { margin: 2rem auto 1rem; color: var(--gold); text-align: center; }
.arabic-preview { margin: 2.2rem 0; font-family: var(--arabic); font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.9; text-align: center; }
.verse-reference { display: flex; justify-content: space-between; color: var(--muted); font-size: .7rem; font-weight: 700; }
.verse-reference span:first-child { color: var(--gold-dark); }
.reader-divider { width: 70px; height: 1px; margin: 1.5rem auto; background: var(--gold); }
.reader-footer { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .76rem; }
.reader-footer span, .reader-footer a { display: flex; align-items: center; gap: .45rem; }
.reader-footer a { color: var(--ink); font-weight: 750; }

/* Home content */
.continue-section { position: relative; z-index: 2; margin-top: -55px; }
.continue-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.7rem; align-items: center; padding: 2rem 2.3rem; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); }
.continue-icon { display: grid; width: 58px; height: 58px; place-items: center; color: var(--gold-dark); background: #f1e8d6; border: 1px solid #ddc99d; border-radius: 50%; font-size: 1.4rem; }
.continue-copy h2 { margin: 0 0 .35rem; font-family: var(--serif); font-size: 1.65rem; }
.continue-copy p { margin: 0; color: var(--muted); }
.continue-copy .section-kicker { margin-bottom: .35rem; }
.surah-showcase { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.surah-tile { position: relative; display: grid; min-height: 210px; padding: 1.7rem; background: rgba(255, 253, 248, .5); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s ease, transform .2s ease; }
.surah-tile:hover { z-index: 1; background: var(--cream); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16, 44, 39, .08); }
.surah-tile .surah-number { position: absolute; top: 1.4rem; left: 1.5rem; display: grid; width: 32px; height: 32px; place-items: center; color: var(--gold-dark); border: 1px solid var(--gold); transform: rotate(45deg); }
.surah-tile .surah-number::first-line { transform: rotate(-45deg); }
.surah-tile .surah-arabic { justify-self: end; margin-bottom: 1rem; font-family: var(--arabic); font-size: 2rem; }
.surah-tile strong { align-self: end; font-family: var(--serif); font-size: 1.35rem; }
.surah-tile small { margin-top: .25rem; color: var(--muted); }
.trust-section { color: var(--cream); background: var(--ink); }
.trust-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8rem; align-items: center; }
.trust-copy h2 { margin: 0 0 1.7rem; font-family: var(--serif); font-size: clamp(2.7rem, 5vw, 4.7rem); font-weight: 500; line-height: 1.05; letter-spacing: -.04em; }
.trust-copy p { margin-bottom: 2rem; color: #bbcbc5; line-height: 1.8; }
.trust-steps { border-top: 1px solid rgba(255, 255, 255, .17); }
.trust-steps article { display: grid; grid-template-columns: 62px 1fr; gap: 1rem; padding: 1.6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .17); }
.trust-steps article > span { color: var(--gold); font-family: var(--serif); font-size: 1.5rem; }
.trust-steps strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.trust-steps p { margin: .4rem 0 0; color: #a9bdb6; line-height: 1.6; }
.guide-invite { background: var(--paper-deep); }
.guide-card { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; padding: 2.7rem 3rem; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); }
.guide-symbol { display: grid; width: 78px; height: 78px; place-items: center; color: var(--gold-dark); border: 1px solid var(--gold); border-radius: 50%; font-size: 2rem; }
.guide-card h2 { margin: 0 0 .45rem; font-family: var(--serif); font-size: 2rem; }
.guide-card p { margin: 0; color: var(--muted); }
.guide-card .section-kicker { margin-bottom: .4rem; }

/* Footer */
.site-footer { padding: 5rem 0 1.5rem; color: #d5dfdb; background: #061d19; }
.footer-main { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; padding-bottom: 3.5rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand strong { font-family: var(--serif); font-size: 1.5rem; color: white; }
.footer-brand p { margin: .2rem 0 0; color: #8fa59d; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-links div { display: flex; flex-direction: column; gap: .65rem; }
.footer-links span { margin-bottom: .4rem; color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.footer-links a { color: #b9c8c3; font-size: .88rem; }
.footer-links a:hover { color: white; }
.source-statement { display: flex; gap: .8rem; align-items: flex-start; padding: 1.25rem 0; color: #a4b6af; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; line-height: 1.6; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; margin-top: .32rem; background: #65b893; border-radius: 50%; box-shadow: 0 0 0 4px rgba(101, 184, 147, .12); }
.status-dot.amber { background: #d4a44e; box-shadow: 0 0 0 4px rgba(212, 164, 78, .13); }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; padding-top: 1.5rem; color: #769087; font-size: .72rem; }

/* Generic page headers */
.page-hero { position: relative; overflow: hidden; padding: 7rem 0 5rem; color: var(--cream); background: var(--ink-deep); }
.page-hero::after { position: absolute; top: -240px; right: -100px; width: 560px; height: 560px; content: ''; border: 1px solid rgba(201, 164, 91, .2); border-radius: 50%; box-shadow: 0 0 0 75px rgba(201, 164, 91, .03), 0 0 0 150px rgba(201, 164, 91, .02); }
.page-hero .container-xl { position: relative; z-index: 1; }
.page-hero h1 { max-width: 900px; margin: 0 0 .8rem; font-family: var(--serif); font-size: clamp(3rem, 6vw, 5.2rem); font-weight: 500; letter-spacing: -.05em; }
.page-hero p { max-width: 720px; margin: 0; color: #b8cbc4; font-size: 1.08rem; }
.compact-hero { padding: 5rem 0 3.8rem; }

/* Surah catalog */
.catalog-tools { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.catalog-search { display: flex; width: min(100%, 540px); align-items: center; gap: .75rem; padding: .8rem 1rem; background: var(--cream); border: 1px solid var(--line); }
.catalog-search input { flex: 1; min-width: 0; padding: 0; background: transparent; border: 0; outline: 0; }
.source-chip { display: flex; align-items: center; gap: .5rem; color: #376156; font-size: .75rem; font-weight: 750; }
.surah-catalog { border-top: 1px solid var(--line); }
.surah-row { display: grid; grid-template-columns: 58px minmax(180px, 1fr) 190px 180px 28px; gap: 1.2rem; align-items: center; padding: 1.2rem 1rem; border-bottom: 1px solid var(--line); transition: background .15s ease, padding .15s ease; }
.surah-row:hover { padding-right: .65rem; padding-left: 1.35rem; background: var(--cream); }
.surah-row[hidden] { display: none; }
.surah-row .surah-number { display: grid; width: 34px; height: 34px; place-items: center; color: var(--gold-dark); border: 1px solid #d6bf8d; transform: rotate(45deg); font-size: .74rem; }
.surah-name { display: flex; flex-direction: column; }
.surah-name strong { font-family: var(--serif); font-size: 1.2rem; }
.surah-name small, .surah-meta { color: var(--muted); font-size: .78rem; }
.surah-row .surah-arabic { font-family: var(--arabic); font-size: 1.7rem; text-align: right; }
.row-arrow { color: var(--gold-dark); }
.source-note { margin-top: 2rem; padding: 1.2rem 1.4rem; color: var(--muted); background: rgba(255, 253, 248, .55); border-left: 3px solid var(--gold); font-size: .78rem; line-height: 1.7; }

/* Surah reader */
.surah-hero { padding: 4rem 0 3.5rem; color: var(--cream); background: var(--ink-deep); }
.crumbs { display: flex; gap: .6rem; margin-bottom: 2.3rem; color: #91a9a0; font-size: .76rem; }
.crumbs a:hover { color: white; }
.surah-title-grid { display: grid; grid-template-columns: 1fr .7fr; gap: 2rem 4rem; align-items: center; }
.surah-title-grid h1 { margin: 0; font-family: var(--serif); font-size: clamp(3.6rem, 7vw, 6.5rem); font-weight: 500; letter-spacing: -.06em; }
.surah-title-grid p { margin: .3rem 0 0; color: #a8beb6; font-size: 1.2rem; }
.surah-title-arabic { font-family: var(--arabic); font-size: clamp(3.4rem, 7vw, 6rem); text-align: right; }
.surah-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 1rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .15); }
.surah-facts div { padding: .2rem 1.3rem; border-right: 1px solid rgba(255, 255, 255, .12); }
.surah-facts div:first-child { padding-left: 0; }
.surah-facts div:last-child { border-right: 0; }
.surah-facts dt { color: #91a9a0; font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.surah-facts dd { margin: .25rem 0 0; font-family: var(--serif); font-size: 1.2rem; }
.reader-shell { padding: 4.5rem 0; }
.reader-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; align-items: start; }
.sticky-card { position: sticky; top: 110px; }
.sidebar-card { padding: 1.4rem; background: rgba(255, 253, 248, .72); border: 1px solid var(--line); }
.sidebar-card label { display: block; margin-bottom: .6rem; font-size: .78rem; font-weight: 750; }
.sidebar-card input[type=range] { width: 100%; accent-color: var(--gold-dark); }
.tool-divider { height: 1px; margin: 1.4rem 0; background: var(--line); }
.sidebar-link { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.sidebar-link:last-child { border-bottom: 0; }
.sidebar-link > svg { margin-top: .12rem; color: var(--gold-dark); }
.sidebar-link span { display: flex; flex-direction: column; }
.sidebar-link strong { font-size: .8rem; }
.sidebar-link small { color: var(--muted); font-size: .68rem; }
.reader-notice { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1rem; padding: 1rem 1.2rem; color: #315e53; background: #e4efe9; border: 1px solid #bfd8cd; }
.reader-notice > svg { margin-top: .12rem; }
.reader-notice strong { font-size: .83rem; }
.reader-notice p { margin: .2rem 0 0; font-size: .76rem; }
.ayah-card { scroll-margin-top: 105px; margin-bottom: 1rem; padding: 1.6rem 2rem 1.3rem; background: var(--cream); border: 1px solid var(--line); transition: border-color .2s ease, box-shadow .2s ease; }
.ayah-card:target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 91, .12); }
.ayah-toolbar { display: flex; justify-content: space-between; align-items: center; }
.ayah-key { display: inline-flex; padding: .35rem .55rem; color: var(--gold-dark); background: #f3ead9; border: 1px solid #e1cfa7; font-size: .7rem; font-weight: 800; }
.ayah-toolbar > div { display: flex; gap: .35rem; }
.tool-button { display: inline-grid; width: 34px; height: 34px; place-items: center; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.tool-button:hover, .tool-button.is-active { color: var(--ink); background: #f0e5cf; border-color: var(--gold); }
.tool-button.is-active svg { fill: var(--gold); }
.ayah-arabic { margin: 2rem 0 1.5rem; font-family: var(--arabic); font-size: 42px; line-height: 2.05; text-align: right; }
.ayah-end { display: inline-block; margin-right: .25rem; color: var(--gold-dark); font-size: .65em; white-space: nowrap; }
.ayah-source { display: flex; gap: .65rem; justify-content: flex-end; color: var(--muted); font-size: .65rem; }
.ayah-source span { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ayah-source a { color: var(--gold-dark); border-bottom: 1px solid #d8c18e; }
.reader-end { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-top: 2.5rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.reader-end > span { font-family: var(--serif); font-size: 1.35rem; }
.reader-end > div { display: flex; gap: .7rem; }
.context-gate { padding: 1rem 0 6rem; }
.gate-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; padding: 2.3rem; background: #e9e3d7; border: 1px solid var(--line); }
.gate-lock { display: grid; width: 58px; height: 58px; place-items: center; color: var(--gold-dark); border: 1px solid var(--gold); border-radius: 50%; }
.gate-card h2 { margin: 0 0 .4rem; font-family: var(--serif); font-size: 1.8rem; }
.gate-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.gate-card .section-kicker { margin-bottom: .35rem; }

/* Mushaf */
.mushaf-head { padding-bottom: 3rem; }
.mushaf-heading { display: flex; justify-content: space-between; align-items: end; }
.mushaf-heading .source-pill { color: #cce1da; background: rgba(121, 168, 151, .12); border-color: rgba(173, 210, 197, .28); }
.mushaf-section { padding: 3rem 0 6rem; }
.mushaf-controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-bottom: 1.4rem; }
.mushaf-controls > .btn:first-child { justify-self: start; }
.mushaf-controls > .btn:last-child { justify-self: end; }
.page-jump { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .75rem; }
.page-jump input { width: 70px; padding: .5rem; text-align: center; background: var(--cream); border: 1px solid var(--line); }
.mushaf-page { position: relative; max-width: 880px; min-height: 1120px; margin: 0 auto; padding: 5rem 5.5rem 4rem; overflow: hidden; background: #fffdf7; border: 1px solid #cbbd9d; box-shadow: 0 26px 60px rgba(39, 31, 16, .14); }
.mushaf-frame { position: absolute; inset: 18px; pointer-events: none; border: 1px solid #d0b978; }
.mushaf-frame::before { position: absolute; inset: 7px; content: ''; border: 1px solid #e0d0a7; }
.mushaf-number { position: absolute; top: 30px; left: 50%; padding: 0 .8rem; color: var(--gold-dark); background: #fffdf7; font-family: var(--serif); transform: translateX(-50%); }
.mushaf-text { font-family: var(--arabic); font-size: clamp(2rem, 4vw, 2.7rem); line-height: 2.05; text-align: justify; text-align-last: center; }
.mushaf-surah-title { display: block; margin: .3rem 0 .7rem; padding: .35rem 1rem; text-align: center; background: #f3ead7; border: 1px solid #d2bb7d; }
.mushaf-surah-title span { color: var(--gold-dark); font-size: .5em; }
.mushaf-ayah { display: inline; }
.mushaf-marker { display: inline; padding: 0; color: var(--gold-dark); background: transparent; border: 0; font-family: var(--arabic); font-size: .7em; white-space: nowrap; cursor: pointer; }
.mushaf-marker:hover, .mushaf-marker:focus { color: var(--ink); background: #ead9b2; outline: 1px solid var(--gold); }
.mushaf-source { position: absolute; right: 40px; bottom: 27px; left: 40px; color: #8a7b5c; font-size: .6rem; text-align: center; }
.bottom-controls { max-width: 880px; margin: 2rem auto 0; }

/* Search */
.large-search { display: flex; align-items: center; gap: .9rem; padding: .65rem .65rem .65rem 1.2rem; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); }
.large-search > svg { color: var(--gold-dark); }
.large-search input { flex: 1; min-width: 0; padding: .7rem 0; background: transparent; border: 0; outline: 0; }
.result-summary { margin: 2.5rem 0 1rem; color: var(--muted); font-size: .82rem; }
.result-summary strong { color: var(--ink); }
.search-results { display: grid; gap: .8rem; }
.search-result { padding: 1.5rem; background: var(--cream); border: 1px solid var(--line); }
.search-result:hover { border-color: var(--gold); box-shadow: 0 12px 30px rgba(16, 44, 39, .08); }
.search-result > div { display: flex; gap: .7rem; align-items: center; }
.search-result > div span { color: var(--gold-dark); font-size: .72rem; font-weight: 800; }
.search-result > div strong { font-family: var(--serif); }
.search-result p { margin: 1.2rem 0; font-family: var(--arabic); font-size: 2rem; line-height: 1.9; text-align: right; }
.search-result small { display: flex; justify-content: flex-end; gap: .4rem; color: var(--muted); }
.search-help { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.search-help article { padding: 1.5rem; background: rgba(255, 253, 248, .55); border: 1px solid var(--line); }
.search-help strong { font-family: var(--serif); font-size: 1.2rem; }
.search-help p { margin: .5rem 0 0; color: var(--muted); }
.empty-state { padding: 4rem 2rem; text-align: center; background: rgba(255, 253, 248, .5); border: 1px solid var(--line); }
.empty-state h2 { font-family: var(--serif); }
.empty-state p { margin-bottom: 0; color: var(--muted); }

/* Source guide */
.guide-hero { position: relative; overflow: hidden; padding: 7rem 0 8rem; color: var(--cream); background: var(--ink-deep); text-align: center; }
.guide-hero .container-lg { position: relative; z-index: 1; }
.guide-mark { display: grid; width: 74px; height: 74px; margin: 0 auto 2rem; place-items: center; color: var(--gold); border: 1px solid var(--gold); border-radius: 50%; font-size: 2rem; }
.guide-hero h1 { margin: 0 auto 1.5rem; font-family: var(--serif); font-size: clamp(3rem, 6vw, 5.3rem); font-weight: 500; line-height: 1.05; letter-spacing: -.05em; }
.guide-hero h1 em { color: #e6c985; font-weight: 400; }
.guide-hero p { max-width: 760px; margin: 0 auto; color: #b7c9c2; font-size: 1.08rem; line-height: 1.75; }
.guide-workspace { padding-bottom: 6rem; }
.guide-form { position: relative; z-index: 2; margin-top: -70px; padding: 2.2rem; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); }
.guide-form > label { display: block; margin-bottom: .9rem; font-family: var(--serif); font-size: 1.35rem; }
.guide-input { display: grid; grid-template-columns: 1fr auto; border: 1px solid #cfc3ad; }
.guide-input textarea { resize: vertical; min-height: 112px; padding: 1rem; background: #fffdf8; border: 0; outline: 0; }
.guide-input .btn { align-self: stretch; margin: 8px; }
.guide-examples { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; color: var(--muted); font-size: .72rem; }
.guide-examples button { padding: .35rem .65rem; color: var(--ink); background: #f1e9da; border: 1px solid var(--line); border-radius: 3px; }
.guide-status { margin-top: 1.5rem; color: var(--muted); }
.guide-status.is-working { padding-left: 1.5rem; }
.guide-status.is-working::before { display: inline-block; width: 12px; height: 12px; margin-right: .6rem; content: ''; border: 2px solid #c6b68f; border-top-color: var(--ink); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.guide-results { display: grid; gap: .8rem; margin-top: 1rem; }
.guide-message { padding: 1rem 1.2rem; color: #315e53; background: #e3eee9; border-left: 3px solid #569479; }
.guide-message.needs-scholar { color: #704f22; background: #f5ead4; border-color: #c99640; }
.guide-result { display: grid; grid-template-columns: 110px 1fr auto; gap: 1.2rem; align-items: center; padding: 1.3rem; background: var(--cream); border: 1px solid var(--line); }
.guide-result span { color: var(--gold-dark); font-weight: 800; }
.guide-result p { margin: 0; font-family: var(--arabic); font-size: 1.8rem; line-height: 1.8; text-align: right; }
.guide-result small { display: block; color: var(--muted); font-size: .63rem; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; }
.boundary-grid article { position: relative; padding: 2rem; background: rgba(255, 253, 248, .55); border: 1px solid var(--line); }
.boundary-grid article > span { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 1.2rem; border-radius: 50%; }
.boundary-yes > span { color: #2c6b57; background: #dcece5; }
.boundary-no > span { color: #8b3f39; background: #f1deda; font-family: var(--serif); font-size: 1.5rem; }
.boundary-grid h2 { font-family: var(--serif); }
.boundary-grid ul { margin: 0; padding-left: 1.2rem; color: var(--muted); line-height: 1.9; }
.configuration-note { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1rem; padding: 1.3rem; background: #e9e3d7; border: 1px solid var(--line); }
.configuration-note strong { font-size: .84rem; }
.configuration-note p { margin: .25rem 0 0; color: var(--muted); font-size: .76rem; }

/* Authentication */
.auth-section { position: relative; overflow: hidden; min-height: calc(100vh - 78px); padding: 5rem 0; background: var(--ink-deep); }
.auth-container { position: relative; z-index: 1; display: grid; place-items: center; }
.auth-card { width: min(100%, 530px); padding: 2.8rem; background: var(--cream); border: 1px solid rgba(201, 164, 91, .45); box-shadow: 24px 24px 0 rgba(201, 164, 91, .08); }
.auth-logo { display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 2.7rem; font-family: var(--serif); font-size: 1.15rem; }
.auth-card h1 { margin: 0 0 .7rem; font-family: var(--serif); font-size: 2.7rem; letter-spacing: -.04em; }
.auth-card > p { margin-bottom: 2rem; color: var(--muted); }
.stack-form { display: grid; gap: 1rem; }
.stack-form label { display: grid; gap: .45rem; font-size: .78rem; font-weight: 750; }
.stack-form label span { color: var(--muted); font-weight: 500; }
.stack-form input, .stack-form textarea, .stack-form select { width: 100%; padding: .8rem .9rem; color: var(--ink); background: white; border: 1px solid #cfc6b5; border-radius: 0; outline: 0; }
.stack-form input:focus, .stack-form textarea:focus, .stack-form select:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201, 164, 91, .12); }
.stack-form label small { color: var(--muted); font-weight: 500; }
.auth-switch { margin-top: 1.3rem; color: var(--muted); font-size: .82rem; text-align: center; }
.auth-switch a { color: var(--ink); font-weight: 750; border-bottom: 1px solid var(--gold); }
.auth-trust { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; padding-top: 1.2rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .68rem; }

/* Account */
.account-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.account-main { display: grid; gap: 1.5rem; }
.dashboard-card { padding: 2rem; background: var(--cream); border: 1px solid var(--line); }
.dashboard-card h2 { margin: 0 0 .5rem; font-family: var(--serif); font-size: 2rem; }
.dashboard-card p { color: var(--muted); }
.progress-card { color: white; background: var(--ink); border-color: var(--ink); }
.progress-card p { color: #aec1ba; }
.progress-card .btn { margin-top: .8rem; }
.count-badge { display: grid; width: 42px; height: 42px; place-items: center; color: var(--gold-dark); background: #f2e9d8; border: 1px solid #ddc89d; border-radius: 50%; }
.bookmark-list { border-top: 1px solid var(--line); }
.bookmark-list a { display: grid; grid-template-columns: 80px 1fr auto 24px; gap: 1rem; align-items: center; padding: 1rem .2rem; border-bottom: 1px solid var(--line); }
.bookmark-list a > span { color: var(--gold-dark); font-weight: 800; }
.bookmark-list strong { font-family: var(--serif); }
.bookmark-list small { color: var(--muted); }
.empty-inline { padding: 2rem; color: var(--muted); text-align: center; border: 1px dashed #cfc4af; }
.account-side { display: grid; gap: 1rem; }
.account-details { margin: 1.3rem 0 1.5rem; }
.account-details div { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.account-details dt { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.account-details dd { margin: .25rem 0 0; word-break: break-word; }
.account-card-heading, .security-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.role-badge { padding: .35rem .55rem; color: var(--ink); background: rgba(201, 164, 91, .2); border: 1px solid rgba(159, 119, 42, .25); font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.security-heading { margin-bottom: 1.4rem; }
.security-heading p { max-width: 620px; margin: .35rem 0 0; }
.security-mark { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; color: var(--ink); background: var(--gold-soft); border: 1px solid rgba(159, 119, 42, .22); }
.security-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.password-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.password-form .btn { justify-self: start; margin-top: .25rem; }
.privacy-card { display: flex; gap: .8rem; padding: 1.2rem; color: #315e53; background: #e3eee9; border: 1px solid #bfd8cd; }
.privacy-card p { margin: .2rem 0 0; font-size: .75rem; }
.reviewer-link { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; color: var(--ink); }
.reviewer-link > svg:first-child { color: var(--gold-dark); }
.reviewer-link strong { font-family: var(--serif); font-size: 1.1rem; }
.reviewer-link p { margin: .2rem 0 0; font-size: .72rem; }

/* Community */
.community-hero h1, .sources-hero h1, .method-hero h1 { line-height: 1.05; }
.community-grid { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.discussion-list { display: grid; gap: 1rem; }
.discussion-list article { padding: 1.6rem; background: var(--cream); border: 1px solid var(--line); }
.discussion-meta { display: flex; gap: .8rem; align-items: center; color: var(--muted); font-size: .7rem; }
.discussion-meta strong { color: var(--ink); }
.discussion-meta span { padding: .25rem .45rem; color: var(--gold-dark); background: #f2ead9; }
.discussion-meta time { margin-left: auto; }
.discussion-list article > p { margin: 1.2rem 0; line-height: 1.8; }
.reviewed-badge { display: flex; gap: .4rem; color: #3b725f; font-size: .66rem; font-weight: 750; }
.submit-card { padding: 1.7rem; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); }
.submit-card h2 { font-family: var(--serif); }
.submit-card > p { color: var(--muted); }
.moderation-rules { margin-top: 1rem; padding: 1.4rem; background: #e9e3d7; border: 1px solid var(--line); }
.moderation-rules ul { padding-left: 1.2rem; color: var(--muted); font-size: .78rem; line-height: 1.8; }
.moderation-rules a { font-size: .76rem; font-weight: 750; border-bottom: 1px solid var(--gold); }
.review-warning { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.2rem; padding: 1.3rem; color: #6e4e20; background: #f4e8d0; border: 1px solid #ddc18a; }
.review-warning p { margin: .25rem 0 0; font-size: .78rem; }
.review-list { display: grid; gap: 1rem; }
.review-list article { padding: 1.6rem; background: var(--cream); border: 1px solid var(--line); }
.review-meta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; color: var(--muted); font-size: .7rem; }
.review-meta > span { color: var(--gold-dark); font-weight: 800; }
.review-meta time { margin-left: auto; }
.review-verse { display: inline-block; margin-top: 1rem; padding: .3rem .55rem; color: var(--gold-dark); background: #f2ead9; font-size: .7rem; font-weight: 750; }
.review-list article > p { margin: 1.3rem 0; line-height: 1.8; white-space: normal; }
.review-actions { display: flex; justify-content: flex-end; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.review-section { margin-top: 3.5rem; scroll-margin-top: 120px; }
.review-section:first-of-type { margin-top: 2rem; }
.review-section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.review-section-heading h2 { margin: .2rem 0 0; font-family: var(--serif); font-size: 2.2rem; }
.concern-item { position: relative; overflow: hidden; }
.concern-item::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ''; background: #9d8e72; }
.concern-item.priority-critical::before { background: #a53838; }
.concern-item.priority-high::before { background: #b47a24; }
.priority-badge, .status-badge { padding: .25rem .45rem; font-size: .58rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); }
.priority-badge.critical { color: #8c2929; background: #f9e0de; border-color: #e7b2ad; }
.priority-badge.high { color: #7c5218; background: #f7ead2; border-color: #dfc28d; }
.priority-badge.normal, .status-badge { color: #315e53; background: #e3eee9; border-color: #bfd8cd; }
.concern-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.5rem; margin: 1.2rem 0; padding: 1rem; background: rgba(234, 226, 211, .55); }
.concern-facts div { min-width: 0; }
.concern-facts dt { color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.concern-facts dd { margin: .25rem 0 0; overflow-wrap: anywhere; font-size: .78rem; }
.concern-facts a { border-bottom: 1px solid var(--gold); }
.reported-wording { margin: 1rem 0; padding: 1rem 1.2rem; color: #513e2a; background: #f5eee1; border-left: 3px solid var(--gold); font-size: .86rem; }
.reported-wording span { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.concern-details > strong { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.concern-details p { margin: .45rem 0 1.2rem; line-height: 1.75; }
.start-review-form { margin-bottom: 1rem; }
.resolution-form { padding-top: 1rem; border-top: 1px solid var(--line); }
.resolution-form label { display: grid; gap: .45rem; color: var(--muted); font-size: .68rem; font-weight: 750; }
.resolution-form textarea { width: 100%; padding: .8rem .9rem; color: var(--ink); background: white; border: 1px solid #cfc6b5; outline: 0; }
.resolution-form textarea:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201, 164, 91, .12); }
.audit-section { padding-top: 2rem; border-top: 1px solid var(--line); }
.audit-list { border: 1px solid var(--line); }
.audit-list > div { display: grid; grid-template-columns: 135px 150px 1fr 140px; gap: .8rem; padding: .8rem 1rem; align-items: center; background: var(--cream); border-bottom: 1px solid var(--line); font-size: .7rem; }
.audit-list > div:last-child { border-bottom: 0; }
.audit-list span, .audit-list small { color: var(--muted); }
.audit-list code { color: var(--ink); font-size: .68rem; }
.audit-list p { grid-column: 3 / -1; margin: 0; color: var(--muted); }

/* Private correction reporting */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; align-items: start; }
.report-card { padding: 2.2rem; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); }
.report-card .section-heading { margin-bottom: 1.6rem; }
.report-card .section-heading h2 { margin: .25rem 0; font-family: var(--serif); font-size: 2.4rem; }
.report-card .section-heading p { max-width: 680px; margin: 0; color: var(--muted); }
.report-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.signed-report-note { display: flex; gap: .55rem; align-items: center; padding: .8rem 1rem; color: #315e53; background: #e3eee9; border: 1px solid #bfd8cd; font-size: .75rem; }
.signed-report-note svg { width: 18px; height: 18px; }
.report-assurance { position: sticky; top: 105px; padding: 2rem; color: var(--cream); background: var(--ink-deep); }
.assurance-seal { display: grid; width: 58px; height: 58px; margin-bottom: 1.5rem; place-items: center; color: var(--gold); border: 1px solid rgba(201, 164, 91, .55); border-radius: 50%; }
.assurance-seal svg { width: 28px; height: 28px; }
.report-assurance ol { display: grid; gap: 0; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.report-assurance li { display: grid; grid-template-columns: 35px 1fr; gap: .7rem; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.report-assurance li > span { color: var(--gold); font-family: var(--serif); }
.report-assurance li strong { font-family: var(--serif); font-size: 1.05rem; }
.report-assurance li p { margin: .2rem 0 0; color: #9fb5ad; font-size: .72rem; }
.urgent-note { margin-top: 1.3rem; padding: 1rem; color: #f0dfbd; background: rgba(201, 164, 91, .08); border: 1px solid rgba(201, 164, 91, .25); }
.urgent-note p { margin: .35rem 0 0; color: #b8cbc4; font-size: .72rem; }
.urgent-note a { color: var(--cream); border-bottom: 1px solid var(--gold); overflow-wrap: anywhere; }

/* Sources and methodology */
.integrity-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.3rem; padding: 1.5rem; color: #2e6253; background: #e1eee8; border: 1px solid #bad5ca; }
.integrity-summary > div { display: flex; gap: 1rem; align-items: center; }
.integrity-check { display: grid; width: 46px; height: 46px; place-items: center; color: white; background: #3f7b66; border-radius: 50%; }
.integrity-summary p { margin: .2rem 0 0; color: #5e7b71; font-size: .78rem; }
.ledger-status { display: inline-flex; gap: .5rem; align-items: center; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.ledger-status .status-dot { margin-top: 0; }
.source-ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.source-ledger article { padding: 2rem; background: var(--cream); border: 1px solid var(--line); }
.source-ledger .source-pending { grid-column: 1 / -1; background: #e9e3d7; }
.source-head { display: flex; justify-content: space-between; gap: 1rem; }
.source-type { color: var(--gold-dark); font-size: .68rem; font-weight: 800; letter-spacing: .15em; }
.source-ledger h2 { margin: 1.5rem 0; font-family: var(--serif); font-size: 2rem; }
.source-ledger dl { margin: 0 0 1.5rem; }
.source-ledger dl div { display: grid; grid-template-columns: 100px 1fr; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.source-ledger dt { color: var(--muted); font-size: .72rem; }
.source-ledger dd { margin: 0; font-size: .78rem; word-break: break-all; }
.source-ledger code { color: var(--ink-soft); font-size: .66rem; }
.source-ledger a { display: inline-flex; gap: .5rem; align-items: center; font-size: .76rem; font-weight: 750; border-bottom: 1px solid var(--gold); }
.source-pending p { max-width: 800px; color: var(--muted); line-height: 1.75; }
.license-note { margin-top: 1rem; padding: 1.5rem; border-left: 3px solid var(--gold); }
.license-note p { margin: .45rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.methodology-content { display: grid; gap: 3rem; }
.method-intro { display: grid; grid-template-columns: 90px 1fr; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.method-number { color: var(--gold-dark); font-family: var(--serif); font-size: 3rem; }
.method-intro h2, .method-list h2, .future-gates h2, .correction-callout h2 { font-family: var(--serif); }
.method-intro h2 { margin-top: 0; font-size: 2.5rem; }
.method-intro p, .method-list p { color: var(--muted); line-height: 1.8; }
.method-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: item; }
.method-list li { display: grid; grid-template-columns: 90px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.method-list li > span { color: var(--gold-dark); font-family: var(--serif); font-size: 1.5rem; }
.method-list h2 { margin: 0 0 .6rem; font-size: 1.7rem; }
.method-list p { margin: 0; }
.future-gates { padding: 2.5rem; color: white; background: var(--ink); }
.future-gates h2 { max-width: 700px; margin: 0 0 2rem; font-size: 2.2rem; }
.gate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.gate-grid span { display: flex; gap: .6rem; align-items: center; padding: .9rem; color: #c6d4cf; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; }
.gate-grid svg { color: var(--gold); }
.correction-callout { display: grid; grid-template-columns: auto 1fr auto; gap: 1.3rem; align-items: center; padding: 2rem; background: var(--cream); border: 1px solid var(--line); }
.correction-callout > div:first-child { display: grid; width: 54px; height: 54px; place-items: center; color: var(--gold-dark); border: 1px solid var(--gold); border-radius: 50%; }
.correction-callout h2 { margin: 0 0 .3rem; }
.correction-callout p { margin: 0; color: var(--muted); }

/* Legal / status */
.prose-page h2 { margin: 2.3rem 0 .7rem; font-family: var(--serif); font-size: 1.8rem; }
.prose-page h2:first-child { margin-top: 0; }
.prose-page p { color: var(--muted); line-height: 1.85; }
.status-page { display: grid; min-height: 65vh; padding: 6rem 1.5rem; place-items: center; align-content: center; text-align: center; }
.status-page h1 { margin: 0 0 .7rem; font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 4.8rem); }
.status-page p { max-width: 600px; margin-bottom: 1.8rem; color: var(--muted); }
.status-mark { display: grid; width: 70px; height: 70px; margin-bottom: 1.5rem; place-items: center; color: var(--gold-dark); border: 1px solid var(--gold); border-radius: 50%; font-size: 1.7rem; }
.status-code { color: var(--gold); font-family: var(--serif); font-size: 6rem; line-height: 1; }
.toast { color: var(--ink); background: var(--cream); border-left: 3px solid var(--gold); box-shadow: var(--shadow); }

@media (max-width: 991.98px) {
    .section-space { padding: 5rem 0; }
    .site-header .navbar-collapse { padding: 1rem 0; }
    .navbar-nav { margin: .5rem 0 1rem !important; }
    .navbar-nav .nav-link { padding-right: 0 !important; padding-left: 0 !important; }
    .navbar-nav .nav-link::after { right: auto; left: 0; width: 42px; }
    .nav-actions { justify-content: flex-start; }
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; padding-top: 6rem; }
    .hero-copy { max-width: 760px; }
    .hero-reader { max-width: 720px; }
    .surah-showcase { grid-template-columns: repeat(2, 1fr); }
    .trust-grid { grid-template-columns: 1fr; gap: 4rem; }
    .reader-layout { grid-template-columns: 1fr; }
    .reader-sidebar { order: 1; }
    .sticky-card { position: static; }
    .sidebar-card { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; align-items: center; }
    .sidebar-card .section-kicker, .sidebar-card .tool-divider { display: none; }
    .surah-row { grid-template-columns: 50px 1fr 160px 130px 24px; }
    .mushaf-page { min-height: 980px; padding: 4.5rem 4rem; }
    .account-grid, .community-grid, .report-layout { grid-template-columns: 1fr; }
    .account-side { grid-template-columns: 1fr 1fr; }
    .report-assurance { position: static; }
}

@media (max-width: 767.98px) {
    .section-space { padding: 4rem 0; }
    .split-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .hero-section, .hero-grid { min-height: 0; }
    .hero-grid { gap: 3rem; padding-top: 4rem; padding-bottom: 7rem; }
    .hero-copy h1 { font-size: clamp(3.2rem, 15vw, 4.5rem); }
    .hero-lead { font-size: 1rem; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .trust-line { gap: 1.5rem; justify-content: space-between; }
    .trust-line strong { font-size: 1.35rem; }
    .hero-reader { padding: 1.4rem; box-shadow: 12px 14px 0 rgba(201, 164, 91, .1); }
    .source-pill { display: none; }
    .arabic-preview { font-size: 2.15rem; }
    .reader-footer { align-items: flex-start; flex-direction: column; }
    .continue-card { grid-template-columns: auto 1fr; padding: 1.4rem; }
    .continue-card .btn { grid-column: 1 / -1; }
    .surah-showcase { grid-template-columns: 1fr; }
    .guide-card { grid-template-columns: auto 1fr; padding: 2rem 1.4rem; }
    .guide-card .btn { grid-column: 1 / -1; }
    .footer-main { grid-template-columns: 1fr; gap: 3rem; }
    .footer-links { gap: 1.2rem; }
    .footer-bottom { flex-direction: column; gap: .5rem; }
    .page-hero { padding: 4.5rem 0 3.5rem; }
    .page-hero h1 { font-size: 3rem; }
    .catalog-tools { align-items: stretch; flex-direction: column; gap: 1rem; }
    .surah-row { grid-template-columns: 45px 1fr auto; gap: .8rem; }
    .surah-row .surah-meta { display: none; }
    .surah-row .surah-arabic { grid-column: 2; grid-row: 2; text-align: left; }
    .surah-row .row-arrow { grid-column: 3; grid-row: 1 / 3; }
    .surah-title-grid { grid-template-columns: 1fr; }
    .surah-title-arabic { text-align: left; }
    .surah-facts { grid-template-columns: repeat(2, 1fr); }
    .surah-facts div { padding: .8rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .surah-facts div:nth-child(2) { border-right: 0; }
    .sidebar-card { grid-template-columns: 1fr; }
    .ayah-card { padding: 1.2rem; }
    .ayah-arabic { font-size: 34px; }
    .ayah-source { justify-content: flex-start; }
    .reader-end { align-items: stretch; flex-direction: column; }
    .reader-end > div { display: grid; grid-template-columns: 1fr 1fr; }
    .gate-card { grid-template-columns: auto 1fr; }
    .gate-card .text-link { grid-column: 1 / -1; }
    .mushaf-heading { align-items: flex-start; flex-direction: column; }
    .mushaf-controls { grid-template-columns: 1fr 1fr; }
    .page-jump { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
    .mushaf-page { min-height: 780px; padding: 4rem 2.3rem 3.5rem; }
    .mushaf-frame { inset: 10px; }
    .mushaf-text { font-size: 1.8rem; line-height: 2; }
    .large-search { align-items: stretch; flex-wrap: wrap; }
    .large-search input { width: calc(100% - 2.3rem); }
    .large-search .btn { width: 100%; }
    .search-help, .boundary-grid { grid-template-columns: 1fr; }
    .guide-hero { padding: 5rem 0 7rem; }
    .guide-form { padding: 1.3rem; }
    .guide-input { grid-template-columns: 1fr; }
    .guide-input .btn { min-height: 50px; }
    .guide-result { grid-template-columns: 1fr; }
    .guide-result p { text-align: right; }
    .auth-card { padding: 2rem 1.4rem; box-shadow: 10px 10px 0 rgba(201, 164, 91, .08); }
    .account-side { grid-template-columns: 1fr; }
    .password-pair { grid-template-columns: 1fr; }
    .bookmark-list a { grid-template-columns: 70px 1fr 22px; }
    .bookmark-list small { display: none; }
    .source-ledger { grid-template-columns: 1fr; }
    .source-ledger .source-pending { grid-column: auto; }
    .source-head { align-items: flex-start; flex-direction: column; }
    .method-intro, .method-list li { grid-template-columns: 50px 1fr; gap: 1rem; }
    .gate-grid { grid-template-columns: 1fr; }
    .correction-callout { grid-template-columns: auto 1fr; }
    .correction-callout .btn { grid-column: 1 / -1; }
    .report-card { padding: 1.4rem; }
    .report-pair, .concern-facts { grid-template-columns: 1fr; }
    .audit-list > div { grid-template-columns: 1fr 1fr; }
    .audit-list p { grid-column: 1 / -1; }
    .review-actions { align-items: stretch; flex-direction: column; }
    .review-actions .btn, .review-actions form, .review-actions form .btn { width: 100%; }
}

@media (max-width: 420px) {
    .trust-line { gap: .7rem; }
    .trust-line span { font-size: .58rem; }
    .surah-facts { font-size: .85rem; }
    .mushaf-page { padding-right: 1.8rem; padding-left: 1.8rem; }
    .mushaf-text { font-size: 1.6rem; }
    .footer-links { grid-template-columns: 1fr 1fr; }
}

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