:root{
    --ink:#24352e;
    --green:#315b49;
    --deep:#183a2d;
    --gold:#b28a45;
    --cream:#f7f1e3;
    --paper:#fffdf8;
    --line:#dfd5c1;
    --muted:#756f63;
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    padding:0;
    overflow-x:hidden;
    color:#332f29;
    background:#f8f5ed;
    font-family:"Noto Naskh Arabic","Amiri",Tahoma,Arial,sans-serif;
    line-height:1.95;
    background-image:radial-gradient(#d7c9ad 0.6px,transparent .6px);
    background-size:18px 18px;
}

.wrap{
    width:min(1120px,calc(100% - 64px));
    margin-left:auto;
    margin-right:auto;
}

/* =========================
   Header
========================= */

.top{
    background:rgba(255,253,248,.97);
    border-bottom:1px solid var(--line);
    box-shadow:0 2px 14px #3a2d1a0d;
}

.topin{
    min-height:84px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    color:var(--deep);
    text-decoration:none;
    font-weight:bold;
    font-size:25px;
}

.brand img{
    width:52px;
    height:52px;
    object-fit:contain;
}

.top nav{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.top nav a{
    color:#4d514b;
    text-decoration:none;
    font-weight:600;
}

.top nav a:hover{
    color:var(--green);
}

/* =========================
   Ads
========================= */

.adspace{
    min-height:90px;
    height:auto;
    background:transparent;
    border:0;
    color:#a29a8b;
    display:block;
    text-align:center;
    margin:15px 0;
    font-size:13px;
}

.adspace.big{
    min-height:130px;
    height:auto;
}

/* =========================
   Intro / Hero
========================= */

.intro{
    position:relative;
    overflow:hidden;
    text-align:center;
    background:linear-gradient(180deg,#efe5d0,#fbf8f0);
    border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);
    padding:58px 15px;
}

.intro:before,
.intro:after{
    content:"۞";
    position:absolute;
    color:#b28a4566;
    font-size:90px;
    top:10px;
    line-height:1;
}

.intro:before{
    right:5%;
}

.intro:after{
    left:5%;
}

.intro h1{
    font-size:40px;
    color:var(--deep);
    margin:0 0 8px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

.intro p{
    color:#756d60;
    font-size:17px;
}

/* =========================
   Search
========================= */

.search{
    display:flex;
    max-width:680px;
    margin:25px auto 0;
    background:#fff;
    border:1px solid #cdbf9f;
    padding:6px;
    border-radius:5px;
    box-shadow:0 6px 20px #4b3a1b0d;
}

.search input{
    flex:1;
    min-width:0;
    border:0;
    padding:12px 14px;
    font-size:17px;
    outline:0;
    background:transparent;
    font-family:inherit;
}

/* =========================
   Buttons
========================= */

.btn,
.search button,
button,
.button{
    display:inline-block;
    background:var(--green);
    color:#fff;
    border:0;
    padding:10px 22px;
    text-decoration:none;
    cursor:pointer;
    border-radius:4px;
    font-family:inherit;
    font-size:15px;
    font-weight:600;
    text-align:center;
    transition:background .2s, transform .1s;
    line-height:1.5;
}

.btn:hover,
.search button:hover,
button:hover,
.button:hover{
    background:var(--deep);
    transform:translateY(-1px);
}

.btn:active,
button:active{
    transform:translateY(0);
}

.btn.alt{
    background:var(--gold);
}

.btn.alt:hover{
    background:#9a7534;
}

.btn.danger{
    background:#a33;
}

.btn.danger:hover{
    background:#822;
}

/* =========================
   Main Layout
========================= */

.layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:28px;
}

.section{
    padding:35px 0;
}

.maincol h2{
    font-size:24px;
    color:var(--deep);
    border-bottom:2px solid var(--gold);
    padding-bottom:9px;
}

/* =========================
   Alphabet
========================= */

.alphabet{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:9px;
}

.alphabet a{
    border:1px solid var(--line);
    background:var(--paper);
    text-decoration:none;
    color:#403b33;
    padding:11px;
    display:flex;
    align-items:center;
    gap:12px;
    border-radius:3px;
}

.alphabet a:hover{
    border-color:var(--gold);
    background:#fffaf0;
}

.alphabet b{
    font-size:23px;
    width:38px;
    text-align:center;
    color:var(--green);
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

.alphabet span{
    font-size:14px;
    color:var(--muted);
}

/* =========================
   Letters Bar
========================= */

.lettersbar{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    border-bottom:1px solid var(--line);
    padding-bottom:15px;
    margin-bottom:20px;
}

.lettersbar a{
    width:36px;
    height:36px;
    line-height:34px;
    border:1px solid #cfc4ad;
    text-align:center;
    text-decoration:none;
    color:var(--deep);
    background:#fffdf8;
}

.lettersbar a:hover,
.lettersbar a.on{
    background:var(--green);
    color:#fff;
    border-color:var(--green);
}

/* =========================
   Word List
========================= */

.wordlist{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    border-top:1px solid var(--line);
    background:#fffdf8;
}

.wordlist a{
    padding:11px 14px;
    border-bottom:1px solid #ebe4d6;
    color:#3d443f;
    text-decoration:none;
}

.wordlist a:hover{
    background:#f5efe2;
    color:var(--green);
}

.wordlist small{
    display:block;
    color:#8a8377;
    font-size:12px;
}

/* =========================
   Sidebar
========================= */

.sidebox{
    border:1px solid var(--line);
    background:#fffdf8;
    padding:17px;
    box-shadow:0 3px 12px #4b3a1b08;
}

.sidebox h3{
    margin-top:0;
    color:var(--deep);
    border-bottom:1px solid var(--line);
    padding-bottom:8px;
}

.sidebox a{
    display:block;
    color:#5e5b54;
    text-decoration:none;
    border-bottom:1px solid #eee7da;
    padding:5px;
}

.sidead{
    min-height:0;
    height:auto;
}

/* =========================
   Sources
========================= */

.source-links{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
}

.source-links a{
    border:1px solid var(--line);
    padding:15px;
    color:#3e423d;
    text-decoration:none;
    background:#fffdf8;
}

.source-links b,
.source-links span{
    display:block;
}

.source-links b{
    color:var(--green);
}

.source-links span{
    color:#777166;
    font-size:13px;
}

/* =========================
   Articles
========================= */

.article{
    background:#fffdf8;
    border:1px solid var(--line);
    padding:32px;
    box-shadow:0 4px 18px #4b3a1b08;
}

.article h1{
    font-size:36px;
    color:var(--deep);
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

.content{
    font-size:19px;
}

.source{
    background:#f3ecdd;
    padding:9px 13px;
    border-right:3px solid var(--gold);
}

.source a{
    color:var(--green);
}

.note{
    margin-top:30px;
    background:#f5efe2;
    border:1px solid var(--line);
    padding:13px;
    color:#6f685d;
}

/* =========================
   Breadcrumb
========================= */

.crumb{
    font-size:13px;
    color:#80786c;
    margin-bottom:18px;
}

.crumb a{
    color:var(--green);
}

/* =========================
   Empty State
========================= */

.empty{
    padding:25px;
    background:#fffdf8;
    border:1px solid var(--line);
}

/* =========================
   Footer
========================= */

footer{
    margin-top:40px;
    background:#203c31;
    color:#e9e0ce;
    border-top:5px solid var(--gold);
}

.foot{
    padding:28px 0;
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:flex-start;
}

.foot-brand b{
    display:block;
    font-size:17px;
    margin-bottom:5px;
    color:#fff;
}

.foot-brand p{
    margin:0;
    color:#cfc5b3;
    font-size:14px;
}

.foot-links{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
    align-items:center;
}

.foot-links a{
    color:#e9e0ce;
    text-decoration:none;
    font-size:14px;
    transition:color .2s;
    padding:4px 0;
    border-bottom:1px solid transparent;
}

.foot-links a:hover{
    color:var(--gold);
    border-bottom-color:var(--gold);
}

.copy{
    text-align:center;
    border-top:1px solid #ffffff20;
    padding:12px;
    font-size:12px;
    color:#cfc5b3;
}

/* =========================
   General
========================= */

.narrow{
    max-width:700px;
}

.logo-placeholder{
    display:none;
}

.islamic-divider{
    text-align:center;
    color:var(--gold);
    letter-spacing:8px;
    margin:15px 0;
}

/* =========================
   Admin
========================= */

.adminbox{
    border:1px solid var(--line);
    background:#fffdf8;
    padding:25px;
}

.adminbox label{
    display:block;
    margin:12px 0;
}

.adminbox input,
.adminbox textarea,
.adminbox select{
    width:100%;
    display:block;
    padding:10px;
    border:1px solid #cfc4ad;
    margin-top:5px;
    font:inherit;
    background:#fff;
}

.adminhead{
    display:flex;
    justify-content:space-between;
}

.stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
}

.stats div{
    border:1px solid var(--line);
    padding:20px;
    background:#fffdf8;
}

.stats b,
.stats span{
    display:block;
}

.stats b{
    font-size:28px;
    color:var(--green);
}

.adminlinks{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:20px;
}

.adminlinks a{
    border:1px solid #cfc4ad;
    padding:12px;
    text-decoration:none;
    color:var(--deep);
    background:#fffdf8;
}

.table{
    overflow:auto;
    border:1px solid var(--line);
}

table{
    border-collapse:collapse;
    width:100%;
    background:#fffdf8;
}

th,
td{
    padding:10px;
    border-bottom:1px solid #e9e1d3;
    text-align:right;
    white-space:nowrap;
}

th{
    background:#f2eadc;
}

.source-admin{
    border:1px solid var(--line);
    padding:12px;
    margin:8px 0;
    background:#fffdf8;
}

/* =========================
   Text Safety
========================= */

.card,
.category,
.source-card,
.admin-box,
.adminbox,
.article,
.article article{
    overflow-wrap:anywhere;
}

/* =========================
   Ad Box
========================= */

.ad-box{
    text-align:center;
    margin:10px 0;
    background:transparent;
    border:0;
    padding:0;
    line-height:0;
}

.ad-box img{
    max-width:100%;
    height:auto;
    display:block;
    margin:0 auto;
    border-radius:3px;
    vertical-align:middle;
}

.ad-box a{
    display:inline-block;
    line-height:0;
}

/* =========================
   About Page
========================= */

.about-page .lead{
    font-size:18px;
    color:#5a5348;
    margin-bottom:25px;
}

.about-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin:25px 0 35px;
}

.stat-card{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:6px;
    padding:18px 12px;
    text-align:center;
    box-shadow:0 3px 12px #4b3a1b08;
    transition:transform .2s, border-color .2s;
}

.stat-card:hover{
    transform:translateY(-3px);
    border-color:var(--gold);
}

.stat-card b{
    display:block;
    font-size:30px;
    color:var(--green);
    font-family:"Amiri","Noto Naskh Arabic",serif;
    line-height:1.2;
}

.stat-card span{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-top:4px;
}

.about-section{
    margin:30px 0;
}

.about-section h2{
    font-size:22px;
    color:var(--deep);
    border-bottom:2px solid var(--gold);
    padding-bottom:8px;
    margin-bottom:14px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

.about-list{
    padding-right:22px;
    margin:0;
    list-style:none;
}

.about-list li{
    position:relative;
    padding:6px 0 6px 0;
    padding-right:22px;
    color:#3d443f;
}

.about-list li::before{
    content:"◆";
    position:absolute;
    right:0;
    top:6px;
    color:var(--gold);
    font-size:11px;
}

.about-note{
    background:#f5efe2;
    border:1px solid var(--line);
    border-right:3px solid var(--gold);
    padding:14px 18px;
    border-radius:4px;
    color:#6f685d;
    font-size:15px;
}

.faq{
    display:grid;
    gap:10px;
}

.faq-item{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:5px;
    overflow:hidden;
    transition:border-color .2s;
}

.faq-item:hover{
    border-color:var(--gold);
}

.faq-item[open]{
    border-color:var(--green);
}

.faq-item summary{
    padding:14px 18px;
    font-weight:600;
    color:var(--deep);
    cursor:pointer;
    list-style:none;
    position:relative;
    padding-left:35px;
    user-select:none;
}

.faq-item summary::-webkit-details-marker{display:none}

.faq-item summary::after{
    content:"+";
    position:absolute;
    left:15px;
    top:50%;
    transform:translateY(-50%);
    color:var(--green);
    font-size:20px;
    font-weight:bold;
    transition:transform .2s;
    line-height:1;
}

.faq-item[open] summary::after{
    content:"−";
    color:var(--gold);
}

.faq-answer{
    padding:0 18px 16px;
    color:#5a5348;
    line-height:1.9;
    border-top:1px solid #eee7da;
    margin-top:-1px;
    padding-top:14px;
}

.about-cta{
    text-align:center;
    background:#f5efe2;
    border:1px solid var(--line);
    border-radius:6px;
    padding:28px 18px;
    margin-top:35px;
}

.about-cta h2{
    border:0;
    margin-bottom:8px;
}

.about-cta p{
    color:var(--muted);
    margin-bottom:15px;
}

/* =========================
   Contact Page (محسّن - مركزي)
========================= */

.contact-page{
    padding-top:20px;
}

.contact-hero{
    text-align:center;
    padding:30px 15px 20px;
    margin-bottom:15px;
    border-bottom:1px solid var(--line);
}

.contact-hero h1{
    font-size:38px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    position:relative;
    display:inline-block;
}

.contact-hero h1::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--gold);
    margin:10px auto 0;
    border-radius:2px;
}

.contact-sub{
    font-size:16px;
    color:#5a5348;
    line-height:1.9;
    max-width:600px;
    margin:0 auto;
}

.contact-alert{
    max-width:700px;
    margin:20px auto;
    text-align:center;
}

.contact-alert ul{
    text-align:right;
    display:inline-block;
    margin-top:8px;
}

.contact-grid{
    display:grid;
    grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
    gap:25px;
    margin-top:25px;
}

.contact-form-wrap h2{
    text-align:center;
    font-size:22px;
    color:var(--deep);
    margin:0 0 20px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    position:relative;
    padding-bottom:10px;
}

.contact-form-wrap h2::after{
    content:"";
    position:absolute;
    bottom:0;
    left:50%;
    transform:translateX(-50%);
    width:50px;
    height:2px;
    background:var(--gold);
    border-radius:2px;
}

.contact-form{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:28px 24px;
    box-shadow:0 4px 18px #4b3a1b08;
}

.form-row{
    margin-bottom:18px;
}

.form-row label{
    display:block;
    margin-bottom:7px;
    color:var(--deep);
    font-weight:600;
    font-size:15px;
}

.form-row .req{
    color:#c0392b;
    font-size:13px;
}

.form-row input,
.form-row textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid #cfc4ad;
    border-radius:5px;
    font:inherit;
    font-size:15px;
    background:#fff;
    transition:border-color .2s, box-shadow .2s;
    box-sizing:border-box;
}

.form-row input:focus,
.form-row textarea:focus{
    outline:0;
    border-color:var(--green);
    box-shadow:0 0 0 3px #315b4920;
}

.form-row textarea{
    resize:vertical;
    min-height:160px;
    line-height:1.8;
    font-family:inherit;
}

.form-hint{
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-top:5px;
}

.form-actions{
    text-align:center;
    margin-top:22px;
}

.form-actions .btn{
    min-width:180px;
    padding:12px 30px;
    font-size:16px;
    font-weight:600;
}

.hp-field{
    position:absolute;
    left:-9999px;
    top:-9999px;
    width:1px;
    height:1px;
    overflow:hidden;
    opacity:0;
    pointer-events:none;
}

.contact-info{
    display:grid;
    gap:15px;
    align-content:start;
}

.info-box{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:22px 18px;
    box-shadow:0 3px 12px #4b3a1b08;
    text-align:center;
}

.info-icon{
    font-size:30px;
    line-height:1;
    margin-bottom:10px;
    display:block;
}

.info-box h3{
    margin:0 0 10px;
    color:var(--deep);
    font-size:17px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    padding-bottom:8px;
    border-bottom:1px solid var(--line);
}

.info-box p{
    margin:6px 0;
    color:#4d514b;
    font-size:14px;
}

.info-box a{
    color:var(--green);
    font-weight:600;
    word-break:break-all;
}

.info-box ul{
    margin:0;
    padding-right:20px;
    color:#4d514b;
    text-align:right;
}

.info-box ul li{
    margin:8px 0;
    line-height:1.8;
    font-size:14px;
}

.info-box .muted{
    color:var(--muted);
    font-size:13px;
    margin-top:8px;
}

/* =========================
   Alerts
========================= */

.alert{
    padding:14px 18px;
    border-radius:6px;
    margin:15px 0;
    font-size:15px;
}

.alert ul{
    margin:8px 0 0;
    padding-right:22px;
}

.alert-success{
    background:#e9f5ee;
    border:1px solid #b7e0c8;
    color:#1e6b45;
}

.alert-error{
    background:#fbeaea;
    border:1px solid #f0b8b8;
    color:#8b2020;
}

/* =========================
   Privacy Page
========================= */

.privacy-page{
    padding-top:20px;
}

.privacy-hero{
    text-align:center;
    padding:30px 15px 20px;
    margin-bottom:20px;
    border-bottom:1px solid var(--line);
}

.privacy-hero h1{
    font-size:38px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    position:relative;
    display:inline-block;
}

.privacy-hero h1::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--gold);
    margin:10px auto 0;
    border-radius:2px;
}

.privacy-sub{
    font-size:16px;
    color:#5a5348;
    line-height:1.9;
    max-width:640px;
    margin:0 auto;
}

.privacy-sub small{
    display:block;
    margin-top:8px;
    color:var(--muted);
    font-size:13px;
}

.privacy-toc{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:22px 26px;
    margin:25px 0 35px;
    box-shadow:0 3px 12px #4b3a1b08;
}

.privacy-toc h2{
    margin:0 0 12px;
    font-size:18px;
    color:var(--deep);
    font-family:"Amiri","Noto Naskh Arabic",serif;
    padding-bottom:8px;
    border-bottom:1px solid var(--line);
}

.privacy-toc ol{
    margin:0;
    padding:0;
    padding-right:22px;
    columns:2;
    column-gap:25px;
}

.privacy-toc li{
    margin:7px 0;
    break-inside:avoid;
}

.privacy-toc a{
    color:var(--green);
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    transition:color .2s, padding .2s;
    display:inline-block;
}

.privacy-toc a:hover{
    color:var(--gold);
    padding-right:5px;
}

.privacy-section{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:26px 28px;
    margin-bottom:18px;
    box-shadow:0 3px 12px #4b3a1b08;
    position:relative;
    transition:border-color .2s;
    scroll-margin-top:90px;
}

.privacy-section:hover{
    border-color:var(--gold);
}

.privacy-icon{
    font-size:28px;
    line-height:1;
    margin-bottom:10px;
    display:inline-block;
}

.privacy-section h2{
    font-size:21px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    padding-bottom:8px;
    border-bottom:2px solid var(--gold);
    display:inline-block;
}

.privacy-section p{
    margin:10px 0;
    color:#3d443f;
    line-height:2;
    font-size:16px;
}

.privacy-list{
    list-style:none;
    padding:0;
    margin:12px 0 5px;
}

.privacy-list li{
    position:relative;
    padding:8px 26px 8px 0;
    color:#3d443f;
    line-height:1.9;
    font-size:15.5px;
    border-bottom:1px solid #f0ebdc;
}

.privacy-list li:last-child{
    border-bottom:0;
}

.privacy-list li::before{
    content:"◆";
    position:absolute;
    right:0;
    top:10px;
    color:var(--gold);
    font-size:11px;
}

.privacy-note{
    background:#f5efe2;
    border:1px solid var(--line);
    border-right:3px solid var(--gold);
    padding:12px 16px;
    border-radius:5px;
    margin:14px 0;
    color:#5a5348;
    font-size:15px;
}

.privacy-note a{
    color:var(--green);
    font-weight:600;
    text-decoration:none;
}

.privacy-note a:hover{
    text-decoration:underline;
}

.privacy-cta{
    text-align:center;
    background:linear-gradient(180deg,#f5efe2,#fffdf8);
    padding:32px 20px;
}

.privacy-cta h2{
    border:0;
    margin-bottom:6px;
}

.privacy-cta p{
    color:var(--muted);
    margin-bottom:15px;
}

.privacy-cta .btn{
    min-width:180px;
    padding:11px 26px;
    font-size:15px;
    font-weight:600;
}

/* =========================
   Terms Page
========================= */

.terms-page{
    padding-top:20px;
}

.terms-hero{
    text-align:center;
    padding:30px 15px 20px;
    margin-bottom:20px;
    border-bottom:1px solid var(--line);
}

.terms-hero h1{
    font-size:38px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    position:relative;
    display:inline-block;
}

.terms-hero h1::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--gold);
    margin:10px auto 0;
    border-radius:2px;
}

.terms-sub{
    font-size:16px;
    color:#5a5348;
    line-height:1.9;
    max-width:680px;
    margin:0 auto;
}

.terms-sub small{
    display:block;
    margin-top:8px;
    color:var(--muted);
    font-size:13px;
}

.terms-toc{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:22px 26px;
    margin:25px 0 35px;
    box-shadow:0 3px 12px #4b3a1b08;
}

.terms-toc h2{
    margin:0 0 12px;
    font-size:18px;
    color:var(--deep);
    font-family:"Amiri","Noto Naskh Arabic",serif;
    padding-bottom:8px;
    border-bottom:1px solid var(--line);
}

.terms-toc ol{
    margin:0;
    padding:0;
    padding-right:22px;
    columns:2;
    column-gap:25px;
}

.terms-toc li{
    margin:7px 0;
    break-inside:avoid;
}

.terms-toc a{
    color:var(--green);
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    transition:color .2s, padding .2s;
    display:inline-block;
}

.terms-toc a:hover{
    color:var(--gold);
    padding-right:5px;
}

.terms-section{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:26px 28px;
    margin-bottom:18px;
    box-shadow:0 3px 12px #4b3a1b08;
    position:relative;
    transition:border-color .2s;
    scroll-margin-top:90px;
}

.terms-section:hover{
    border-color:var(--gold);
}

.terms-icon{
    font-size:28px;
    line-height:1;
    margin-bottom:10px;
    display:inline-block;
}

.terms-section h2{
    font-size:21px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    padding-bottom:8px;
    border-bottom:2px solid var(--gold);
    display:inline-block;
}

.terms-section p{
    margin:10px 0;
    color:#3d443f;
    line-height:2;
    font-size:16px;
}

.terms-list{
    list-style:none;
    padding:0;
    margin:12px 0 5px;
}

.terms-list li{
    position:relative;
    padding:8px 26px 8px 0;
    color:#3d443f;
    line-height:1.9;
    font-size:15.5px;
    border-bottom:1px solid #f0ebdc;
}

.terms-list li:last-child{
    border-bottom:0;
}

.terms-list li::before{
    content:"◆";
    position:absolute;
    right:0;
    top:10px;
    color:var(--gold);
    font-size:11px;
}

.terms-note{
    background:#f5efe2;
    border:1px solid var(--line);
    border-right:3px solid var(--gold);
    padding:12px 16px;
    border-radius:5px;
    margin:14px 0;
    color:#5a5348;
    font-size:15px;
}

.terms-cta{
    text-align:center;
    background:linear-gradient(180deg,#f5efe2,#fffdf8);
    padding:32px 20px;
}

.terms-cta h2{
    border:0;
    margin-bottom:6px;
}

.terms-cta p{
    color:var(--muted);
    margin-bottom:15px;
}

.terms-cta .btn{
    min-width:180px;
    padding:11px 26px;
    font-size:15px;
    font-weight:600;
}

/* =========================
   Sources List Page
========================= */

.sources-page{
    padding-top:20px;
}

.sources-hero{
    text-align:center;
    padding:30px 15px 20px;
    margin-bottom:20px;
    border-bottom:1px solid var(--line);
}

.sources-hero h1{
    font-size:38px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    position:relative;
    display:inline-block;
}

.sources-hero h1::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--gold);
    margin:10px auto 0;
    border-radius:2px;
}

.sources-sub{
    font-size:16px;
    color:#5a5348;
    line-height:1.9;
    max-width:640px;
    margin:0 auto;
}

.sources-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin:25px 0 35px;
}

.sources-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:15px;
}

.source-card{
    display:flex;
    gap:15px;
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:20px;
    text-decoration:none;
    color:inherit;
    transition:border-color .2s, transform .15s, box-shadow .2s;
}

.source-card:hover{
    border-color:var(--gold);
    transform:translateY(-3px);
    box-shadow:0 8px 22px #4b3a1b10;
}

.source-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:50px;
    height:50px;
    min-width:50px;
    background:#efe5d0;
    border-radius:8px;
    font-size:24px;
}

.source-body{
    min-width:0;
    flex:1;
}

.source-body h2{
    margin:0 0 8px;
    color:var(--deep);
    font-size:19px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    border:0;
    padding:0;
}

.source-body p{
    margin:0 0 12px;
    color:#5a5348;
    font-size:14px;
    line-height:1.8;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.source-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding-top:10px;
    border-top:1px solid #f0ebdc;
}

.source-count{
    background:var(--green);
    color:#fff;
    padding:3px 10px;
    border-radius:12px;
    font-size:12px;
    font-weight:600;
}

.source-more{
    color:var(--gold);
    font-size:13px;
    font-weight:600;
}

/* =========================
   Single Source Page
========================= */

.source-page{
    padding-top:20px;
}

.source-hero{
    text-align:center;
    padding:20px 15px 25px;
    margin-bottom:20px;
    border-bottom:1px solid var(--line);
}

.source-hero .crumb{
    margin-bottom:12px;
}

.source-icon-lg{
    font-size:48px;
    line-height:1;
    margin-bottom:12px;
}

.source-hero h1{
    font-size:36px;
    color:var(--deep);
    margin:0 0 12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
    position:relative;
    display:inline-block;
}

.source-hero h1::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--gold);
    margin:10px auto 0;
    border-radius:2px;
}

.source-desc{
    font-size:16px;
    color:#5a5348;
    line-height:1.9;
    max-width:640px;
    margin:0 auto 15px;
}

.source-count-lg{
    color:var(--muted);
    font-size:15px;
    margin:0;
}

.source-count-lg b{
    color:var(--green);
    font-size:20px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

/* =========================
   Tablet
========================= */

@media(max-width:800px){

    .wrap{
        width:calc(100% - 40px);
    }

    .topin{
        display:block;
        padding:12px 0;
    }

    .top nav{
        margin-top:8px;
        gap:10px;
        font-size:13px;
    }

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

    .alphabet{
        grid-template-columns:repeat(2,1fr);
    }

    .wordlist,
    .source-links{
        grid-template-columns:1fr;
    }

    .intro h1{
        font-size:31px;
    }

    .stats{
        grid-template-columns:1fr;
    }

    .foot{
        display:block;
        text-align:center;
    }

    .foot-brand{
        margin-bottom:15px;
    }

    .foot-links{
        justify-content:center;
        gap:12px;
    }

    .brand{
        font-size:22px;
    }

    .article{
        padding:24px;
    }

    /* About */
    .about-stats{grid-template-columns:repeat(2,1fr)}
    .stat-card b{font-size:24px}

    /* Contact */
    .contact-grid{
        grid-template-columns:1fr;
    }
    .contact-hero h1{
        font-size:30px;
    }
    .contact-sub{
        font-size:15px;
    }
    .contact-form{
        padding:20px 16px;
    }

    /* Privacy */
    .privacy-hero h1{
        font-size:30px;
    }
    .privacy-sub{
        font-size:15px;
    }
    .privacy-toc ol{
        columns:1;
    }
    .privacy-section{
        padding:20px 18px;
    }
    .privacy-section h2{
        font-size:19px;
    }
    .privacy-section p{
        font-size:15px;
    }
    .privacy-list li{
        font-size:14.5px;
    }

    /* Terms */
    .terms-hero h1{
        font-size:30px;
    }
    .terms-sub{
        font-size:15px;
    }
    .terms-toc ol{
        columns:1;
    }
    .terms-section{
        padding:20px 18px;
    }
    .terms-section h2{
        font-size:19px;
    }
    .terms-section p{
        font-size:15px;
    }
    .terms-list li{
        font-size:14.5px;
    }

    /* Sources */
    .sources-hero h1{
        font-size:30px;
    }
    .sources-sub{
        font-size:15px;
    }
    .sources-stats{
        grid-template-columns:1fr;
    }
    .sources-grid{
        grid-template-columns:1fr;
    }
    .source-hero h1{
        font-size:28px;
    }
    .source-icon-lg{
        font-size:38px;
    }
    .source-desc{
        font-size:15px;
    }
}

/* =========================
   Mobile
========================= */

@media(max-width:600px){

    .wrap{
        width:calc(100% - 28px);
    }

    .intro{
        padding:40px 10px;
    }

    .intro h1{
        font-size:28px;
        line-height:1.5;
    }

    .intro p{
        font-size:15px;
    }

    .section{
        padding:28px 0;
    }

    .article{
        padding:18px;
    }

    .article h1{
        font-size:28px;
        line-height:1.6;
    }

    .content{
        font-size:17px;
        line-height:2;
    }

    .search{
        width:100%;
    }

    .search input{
        min-width:0;
        font-size:15px;
    }

    .search button{
        padding:9px 14px;
    }

    .sidebox{
        padding:15px;
    }

    .adspace{
        margin:12px 0;
    }

    .lettersbar{
        gap:4px;
    }

    .lettersbar a{
        width:34px;
        height:34px;
        line-height:32px;
    }
}

/* =========================
   Small Mobile
========================= */

@media(max-width:400px){

    .wrap{
        width:calc(100% - 22px);
    }

    .article{
        padding:15px;
    }

    .alphabet{
        grid-template-columns:1fr;
    }

    .intro{
        padding:32px 8px;
    }

    .intro:before,
    .intro:after{
        font-size:60px;
    }

    .search{
        padding:4px;
    }

    .search input{
        padding:9px;
        font-size:14px;
    }

    .search button{
        padding:8px 11px;
        font-size:14px;
    }

    .about-stats{grid-template-columns:1fr}
    .about-page .lead{font-size:16px}

    .privacy-hero{
        padding:20px 8px 15px;
    }
    .privacy-hero h1{
        font-size:24px;
    }
    .privacy-section{
        padding:18px 14px;
    }

    .terms-hero{
        padding:20px 8px 15px;
    }
    .terms-hero h1{
        font-size:24px;
    }
    .terms-section{
        padding:18px 14px;
    }

    .sources-hero{
        padding:20px 8px 15px;
    }
    .sources-hero h1{
        font-size:24px;
    }
    .source-card{
        padding:15px;
    }
    .source-body h2{
        font-size:17px;
    }
    .source-hero h1{
        font-size:24px;
    }
    .source-icon-lg{
        font-size:32px;
    }
}

/* =========================
   Home Page (Hero محسّن)
========================= */

.intro-v2{
    padding:65px 15px 50px;
}

.intro-v2 .wrap{
    position:relative;
    z-index:2;
}

.intro-sub{
    font-size:17px;
    color:#756d60;
    margin:0 auto 5px;
    max-width:640px;
    line-height:1.9;
}

/* إحصائيات تحت البحث */
.hero-stats{
    display:flex;
    justify-content:center;
    gap:35px;
    margin-top:30px;
    flex-wrap:wrap;
}

.hero-stats > div{
    text-align:center;
    min-width:80px;
}

.hero-stats b{
    display:block;
    font-size:28px;
    color:var(--green);
    font-family:"Amiri","Noto Naskh Arabic",serif;
    line-height:1.1;
}

.hero-stats span{
    display:block;
    font-size:13px;
    color:var(--muted);
    margin-top:3px;
}

/* نتيجة البحث */
.result-count{
    color:var(--muted);
    font-size:14px;
    margin:-5px 0 15px;
}

/* كيف تستخدم الموسوعة */
.how-steps{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:15px;
    margin:15px 0 35px;
}

.how-step{
    background:#fffdf8;
    border:1px solid var(--line);
    border-radius:8px;
    padding:22px 18px;
    text-align:center;
    transition:border-color .2s, transform .15s;
}

.how-step:hover{
    border-color:var(--gold);
    transform:translateY(-3px);
}

.step-num{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    background:var(--green);
    color:#fff;
    border-radius:50%;
    font-size:20px;
    font-weight:bold;
    margin-bottom:12px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

.how-step h3{
    margin:0 0 8px;
    color:var(--deep);
    font-size:16px;
    font-family:"Amiri","Noto Naskh Arabic",serif;
}

.how-step p{
    margin:0;
    color:#5a5348;
    font-size:14px;
    line-height:1.8;
}

/* تجاوب الصفحة الرئيسية */
@media(max-width:800px){
    .intro-v2{
        padding:45px 12px 35px;
    }
    .intro-sub{
        font-size:15px;
    }
    .hero-stats{
        gap:22px;
        margin-top:22px;
    }
    .hero-stats b{
        font-size:22px;
    }
    .how-steps{
        grid-template-columns:1fr;
    }
}

@media(max-width:400px){
    .intro-v2{
        padding:35px 8px 28px;
    }
    .hero-stats b{
        font-size:20px;
    }
    .hero-stats span{
        font-size:12px;
    }
}

/* =========================
   Letter Sections (Admin)
========================= */

.letter-section summary::-webkit-details-marker{display:none}
.letter-section summary::marker{display:none}

.letter-heading:hover{
    background:#efe5d0 !important;
}

.letter-heading::after{
    content:"▾";
    color:var(--green);
    font-size:14px;
    transition:transform .2s;
    margin-right:auto;
    margin-left:10px;
}

.letter-section[open] .letter-heading::after{
    transform:rotate(180deg);
}

.letters-index a:hover{
    background:var(--green) !important;
    color:#fff !important;
    border-color:var(--green) !important;
}

.letter-section{
    scroll-margin-top:90px;
}