@import url('https://fonts.cdnfonts.com/css/kfgqpc-hafs-uthmanic-script');

@font-face{
    font-family:'KFGQPC Hafs';
    src:
        local('KFGQPC Hafs'),
        url('/fonts/kfgqpc-hafs.woff2') format('woff2'),
        url('https://cdn.jsdelivr.net/gh/thetruetruth/quran-data-kfgqpc@main/hafs/font/hafs.18.woff2') format('woff2');
    font-style:normal;
    font-weight:400;
    font-display:swap;
}

.quran-page{
    --quran-arabic-size:34px;
    --quran-paragraph-size:42px;
    --quran-bismillah-size:34px;
    display:grid;
    gap:18px;
}

.quran-hero{
    display:grid;
    grid-template-columns:minmax(0,1.4fr) minmax(260px,.8fr);
    gap:22px;
    align-items:center;
    background:
        radial-gradient(circle at top right, rgba(211,166,45,.2), transparent 35%),
        linear-gradient(135deg,#fdfefd 0%,#edf8f2 100%);
}

.quran-kicker{
    display:inline-flex;
    align-items:center;
    padding:7px 12px;
    border-radius:999px;
    background:rgba(13,122,92,.1);
    color:var(--brand2);
    font-size:12px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.quran-hero h1{
    margin:12px 0 10px;
    font-size:clamp(30px, 4vw, 52px);
    line-height:1.05;
}

.quran-hero p{
    margin:0;
    max-width:700px;
    font-size:17px;
}

.quran-hero-badges{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:flex-end;
}

.quran-hero-badges span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 16px;
    border-radius:999px;
    background:linear-gradient(135deg,#0d7a5c 0%,#0a5945 100%);
    color:#fff;
    font-weight:800;
    box-shadow:0 16px 28px rgba(13,122,92,.18);
}

.quran-toolbar-grid{
    display:grid;
    grid-template-columns:minmax(120px,.9fr) minmax(250px,1.8fr) minmax(140px,1fr) minmax(250px,1.8fr) minmax(130px,.9fr) auto;
    gap:14px;
    align-items:end;
}

.quran-field{
    min-width:0;
}

.quran-toolbar label,
.quran-search-input{
    display:grid;
    gap:7px;
}

.quran-toolbar label span,
.quran-search-input span{
    font-size:13px;
    font-weight:800;
    color:var(--brand2);
}

.quran-toolbar-actions{
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
    height:100%;
}

.quran-search-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:14px;
    margin-top:16px;
}

.quran-display-options{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:16px;
}

.quran-toggle{
    display:inline-flex;
    align-items:center;
    gap:9px;
    padding:10px 14px;
    border:1px solid #dcebe4;
    border-radius:999px;
    background:#fbfefd;
    font-weight:800;
    color:var(--brand2);
}

.quran-toggle input{
    width:16px;
    height:16px;
    margin:0;
}

.quran-layout{
    display:grid;
    grid-template-columns:290px minmax(0,1fr);
    gap:18px;
    align-items:start;
}

.quran-side{
    display:grid;
    gap:18px;
}

.quran-side-card h3{
    margin-top:0;
}

.quran-search-results{
    display:grid;
    gap:10px;
}

.quran-search-hit{
    display:grid;
    gap:6px;
    width:100%;
    text-align:left;
    border:1px solid #dcebe4;
    border-radius:16px;
    background:#fbfefd;
    padding:14px;
    color:var(--text);
    box-shadow:none;
}

.quran-search-hit:hover{
    border-color:rgba(13,122,92,.35);
    background:#f3fbf7;
}

.quran-reader-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:12px;
}

.quran-reader-tools{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.quran-font-tools{
    display:flex;
    align-items:center;
    gap:8px;
}

.quran-toolbar-font-tools{
    display:flex;
    align-items:center;
    gap:8px;
}

.quran-font-btn{
    min-width:58px;
}

.quran-reader-head h2{
    margin:0;
    font-size:34px;
    line-height:1.1;
}

.quran-status{
    margin:14px 0;
    padding:12px 14px;
    border-radius:14px;
    background:#edf7f2;
    color:var(--brand2);
    font-weight:700;
}

.quran-status[data-tone="error"]{
    background:#fff1f1;
    color:#a02626;
}

.quran-status[data-tone="success"]{
    background:#ecfbf3;
    color:#0c6b50;
}

.quran-audio{
    width:100%;
    margin-bottom:18px;
}

.quran-verses{
    display:grid;
    gap:14px;
}

.quran-reading-sheet{
    padding:22px;
    border:1px solid #dcebe4;
    border-radius:26px;
    background:
        radial-gradient(circle at top right, rgba(211,166,45,.09), transparent 28%),
        linear-gradient(180deg,#ffffff 0%,#f8fcfa 100%);
    box-shadow:0 18px 42px rgba(7,63,52,.07);
}

.quran-bismillah-block{
    font-family:'KFGQPC HAFS Uthmanic Script','KFGQPC Hafs','Amiri Quran','Scheherazade New','Traditional Arabic',serif;
    font-size:var(--quran-bismillah-size);
    line-height:2.05;
    text-align:center;
    color:#0a3d33;
    margin:0 0 18px;
    padding:10px 14px;
    border-radius:18px;
    background:linear-gradient(180deg,#f9fdfb 0%,#eef8f2 100%);
    border:1px solid rgba(13,122,92,.12);
}

.quran-reading-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:18px;
}

.quran-reading-count{
    color:var(--muted);
    font-size:13px;
    font-weight:700;
}

.quran-arabic-paragraph{
    font-family:'KFGQPC HAFS Uthmanic Script','KFGQPC Hafs','Amiri Quran','Scheherazade New','Traditional Arabic',serif;
    font-size:var(--quran-paragraph-size);
    line-height:2.2;
    color:#08392f;
    text-align:right;
    unicode-bidi:plaintext;
    word-spacing:0;
}

.quran-arabic-ayah{
    cursor:pointer;
    border-radius:10px;
    padding:2px 4px;
    transition:background-color .18s ease, box-shadow .18s ease;
}

.quran-arabic-ayah.is-highlighted{
    background:rgba(13,122,92,.09);
    box-shadow:0 0 0 1px rgba(13,122,92,.14);
}

.quran-arabic-text{
    display:inline;
}

.quran-ayah-marker{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:34px;
    height:34px;
    margin:0 8px 0 6px;
    border-radius:50%;
    border:1px solid rgba(13,122,92,.18);
    background:rgba(255,255,255,.82);
    color:#0a5b47;
    font-size:20px;
    line-height:1;
    vertical-align:middle;
}

.quran-verse{
    padding:18px;
    border:1px solid #dcebe4;
    border-radius:22px;
    background:linear-gradient(180deg,#ffffff 0%,#fbfefd 100%);
    box-shadow:0 16px 35px rgba(7,63,52,.05);
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.quran-verse.is-highlighted{
    border-color:rgba(13,122,92,.65);
    box-shadow:0 20px 40px rgba(13,122,92,.16);
    transform:translateY(-1px);
}

.quran-verse-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}

.quran-verse-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.quran-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:32px;
    padding:0 12px;
    border-radius:999px;
    background:var(--brand2);
    color:#fff;
    font-size:12px;
    font-weight:800;
}

.quran-chip.light{
    background:#f3f8f5;
    color:var(--brand2);
}

.quran-arabic{
    font-family:'KFGQPC HAFS Uthmanic Script','KFGQPC Hafs','Amiri Quran','Scheherazade New','Traditional Arabic',serif;
    font-size:var(--quran-arabic-size);
    line-height:2.05;
    color:#0a3d33;
    margin-bottom:14px;
}

.quran-translation{
    font-size:17px;
    line-height:1.9;
    color:#24483f;
}

.quran-audio-button{
    white-space:nowrap;
}

@media(max-width:1100px){
    .quran-toolbar-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .quran-layout,
    .quran-hero{
        grid-template-columns:1fr;
    }

    .quran-hero-badges{
        justify-content:flex-start;
    }
}

@media(max-width:760px){
    .quran-page{
        --quran-arabic-size:30px;
        --quran-paragraph-size:34px;
        --quran-bismillah-size:30px;
    }

    .quran-toolbar-grid,
    .quran-search-row{
        grid-template-columns:1fr;
    }

    .quran-reader-head,
    .quran-verse-top{
        flex-direction:column;
        align-items:flex-start;
    }

    .quran-reader-tools{
        justify-content:flex-start;
    }

    .quran-reading-head{
        flex-direction:column;
        align-items:flex-start;
    }

    .quran-reader-head h2{
        font-size:28px;
    }

    .quran-arabic{
        font-size:28px;
        line-height:1.9;
    }

    .quran-arabic-paragraph{
        line-height:2;
        text-align:right;
        overflow-wrap:normal;
        word-break:normal;
    }
}
