/* ===== صفحات المقالات ===== */
.lead{padding-top:clamp(6rem,11vw,9rem);padding-bottom:clamp(2rem,5vw,4rem)}
.a-h1{margin:0 0 clamp(1.6rem,3vw,2.6rem);font-size:clamp(2.2rem,5vw,3.6rem);line-height:1.2}
.muted{color:var(--muted)}

/* الأرشيف */
.cats{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:clamp(1.4rem,3vw,2.2rem)}
.cats a{padding:.3rem 1.1rem;border:thin solid var(--line);border-radius:999rem;color:var(--cream);text-decoration:none;font-size:.9rem;transition:border-color .2s ease,color .2s ease}
.cats a:hover{border-color:var(--brass);color:var(--brass)}
.cats [aria-current="page"]{background:var(--brass);border-color:var(--brass);color:#17110C;font-weight:600}
.cat-h{margin-top:1rem}
.cat-desc{max-width:50em;margin:0 0 clamp(1.6rem,3vw,2.4rem);color:var(--muted);line-height:2}
.cards{display:flex;flex-wrap:wrap;gap:2.4vw 2vw;width:100%}
.card{--n:3;flex:0 0 calc((100% - (var(--n) - 1)*2vw)/var(--n));min-width:0;display:flex;flex-direction:column;overflow:hidden;border:thin solid rgba(201,165,107,.28);border-radius:1.1rem;background:linear-gradient(160deg,#1B1511,#0B0907);box-shadow:0 .6rem 1.4rem rgba(0,0,0,.45);transition:border-color .25s ease,box-shadow .25s ease,translate .25s ease}
.card:hover,.card:focus-within{border-color:var(--brass);box-shadow:0 1rem 2.2rem rgba(0,0,0,.6),0 0 0 thin rgba(201,165,107,.25);translate:0 -.25rem}
.card img,.card .noimg{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-bottom:thin solid var(--line)}
.card .noimg{background:linear-gradient(160deg,#241A14,#0F0B09)}
.card .cat{padding:.9rem 1.1rem 0;font-size:.8rem;color:var(--brass);font-weight:600;line-height:1.4}
.card .t{padding:.9rem 1.1rem 1.1rem;font-size:1.05rem;font-weight:600;line-height:1.7;color:var(--cream);text-decoration:none;overflow-wrap:anywhere;transition:color .2s ease}
.card .cat+.t{padding-top:.3rem}
.card .t:hover,.card .t:focus-visible{color:var(--brass)}
.card .t:focus-visible{outline:.15rem solid var(--brass);outline-offset:-.15rem;border-radius:.3rem}
.pager{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.8rem;margin-top:clamp(2rem,4vw,3.5rem)}
.pager a,.pager span{display:flex;align-items:center;justify-content:center;min-width:2.6rem;padding:.35rem 1rem;border:thin solid var(--line);border-radius:999rem;color:var(--cream);text-decoration:none;font-size:.95rem}
.pager a:hover{border-color:var(--brass);color:var(--brass)}
.pager [aria-current="page"]{background:var(--brass);border-color:var(--brass);color:#17110C;font-weight:600}

/* صفحة المقال */
.art-top{padding-top:2.5vw}
.art-img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:1.2rem;border:thin solid var(--line)}
.art-body{padding-block:clamp(1.4rem,3vw,2.4rem) clamp(2rem,5vw,4rem)}
.art-in{display:flex;flex-direction:column;width:100%;max-width:55em;padding-inline:2vw}
.crumbs ol{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .6rem;font-size:.9rem;color:var(--muted)}
.crumbs li{display:flex;align-items:center;gap:.6rem}
.crumbs li+li::before{content:"\2039";color:var(--brass)}
.crumbs a{color:var(--muted);text-decoration:none;transition:color .2s ease}
.crumbs a:hover{color:var(--brass)}
.crumbs [aria-current="page"]{color:var(--cream)}
.a-title{margin:1.2rem 0 1.6rem;font-size:clamp(1.8rem,3.6vw,2.8rem);line-height:1.35}
.toc{margin-bottom:clamp(1.6rem,3vw,2.4rem);padding:1.1rem 1.5rem;border:thin solid var(--line);border-radius:1rem;background:rgba(241,232,216,.03)}
.toc-t{margin-bottom:.6rem;color:var(--brass);font-weight:600}
.toc ol{display:flex;flex-direction:column;gap:.35rem;padding-inline-start:1.4em;list-style:decimal;color:var(--brass)}
.toc a{color:var(--cream);text-decoration:none;transition:color .2s ease}
.toc a:hover{color:var(--brass)}
.prose{font-size:1.05rem;line-height:2.05;color:#E3DACB;overflow-wrap:anywhere}
.prose>*+*{margin-top:1.1rem}
.prose h2,.prose h3,.prose h4{font-family:"El Messiri","IBM Plex Sans Arabic",serif;color:var(--cream);line-height:1.4;margin-top:2.2rem}
.prose h2{font-size:clamp(1.5rem,2.6vw,2rem)}
.prose h3{font-size:clamp(1.25rem,2.1vw,1.5rem);color:var(--brass)}
.prose h4{font-size:1.15rem;color:var(--brass)}
.prose ul,.prose ol{padding-inline-start:1.4em}
.prose ul{list-style:disc}.prose ol{list-style:decimal}
.prose li::marker{color:var(--brass)}
.prose a{color:var(--brass);text-underline-offset:.25em}
.prose blockquote{padding:.4rem 1.2rem;border-inline-start:.2rem solid var(--brass);color:var(--muted);background:rgba(201,165,107,.06);border-radius:.5rem}
.prose img{display:block;max-width:100%;height:auto;border-radius:.8rem;border:thin solid var(--line)}
.prose figure{margin:1.6rem 0}
.prose figcaption{margin-top:.5rem;color:var(--muted);font-size:.9rem;text-align:center}
.prose hr{border:0;border-top:thin solid var(--line);margin:2rem 0}
.prose pre{overflow-x:auto;padding:1rem;border:thin solid var(--line);border-radius:.8rem;background:#0B0907;direction:ltr;text-align:left}
.prose code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92em}
.prose table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse}
.prose th,.prose td{padding:.5rem .8rem;border:thin solid var(--line)}
.prose th{background:rgba(201,165,107,.1);color:var(--cream)}
.prose iframe,.prose video{max-width:100%}
.h-sec{scroll-margin-top:2rem}
.draft-note{padding:.6rem 1rem;margin-bottom:1rem;border:thin dashed var(--brass);border-radius:.8rem;color:var(--brass);font-size:.9rem}
.nf{display:flex;flex-direction:column;align-items:center;gap:1.2rem;text-align:center;padding-block:clamp(4rem,12vw,9rem)}

@media (max-width:53.75em){.card{--n:2}}
@media (max-width:35em){.card{--n:1}}
@media (prefers-reduced-motion:reduce){.card,.card .t,.cats a{transition:none}.card:hover,.card:focus-within{translate:none}}

/* ===== صفحة 404 ===== */
.nf404{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(.4rem,1.6vh,1rem);height:80vh;height:80dvh;margin-block:9vh;margin-block:9dvh;padding:1vh 5vw;overflow:hidden;text-align:center;background:radial-gradient(55% 45% at 50% 40%,rgba(201,165,107,.17),transparent 70%)}
.lost{flex:1 1 0;min-height:0;width:100%;max-width:34rem;overflow:visible;color:var(--brass)}
.lost *{transform-box:fill-box;transform-origin:center}
.lost .n4 path{stroke-dasharray:1;stroke-dashoffset:1;animation:draw 1.5s ease forwards}
.lost .sheet{transform-origin:center bottom;animation:bob 3.4s ease-in-out infinite}
.lost .shadow{opacity:.18;animation:shade 3.4s ease-in-out infinite}
.lost .mag{animation:search 5s ease-in-out infinite alternate}
.lost .stars circle{opacity:.25;animation:twinkle 3s ease-in-out infinite;animation-delay:var(--d,0s)}
.lost .q{opacity:0;animation:rise404 4s ease-in infinite;animation-delay:var(--d,0s)}
@keyframes draw{to{stroke-dashoffset:0}}
@keyframes bob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-9%) rotate(3deg)}}
@keyframes shade{0%,100%{transform:scaleX(1);opacity:.18}50%{transform:scaleX(.78);opacity:.1}}
@keyframes search{0%{transform:translate(8%,0) rotate(6deg)}50%{transform:translate(-120%,-55%) rotate(-12deg)}100%{transform:translate(-210%,-10%) rotate(10deg)}}
@keyframes twinkle{0%,100%{opacity:.2}50%{opacity:1}}
@keyframes rise404{0%{opacity:0;transform:translateY(40%) rotate(-8deg)}25%{opacity:.9}100%{opacity:0;transform:translateY(-90%) rotate(10deg)}}
.nf-h{flex:none;margin:0;font-family:var(--fh);font-size:clamp(1.3rem,4.6vh,2.4rem);font-weight:700;line-height:1.2}
.nf-p{flex:none;max-width:30em;margin:0;color:var(--muted);font-size:clamp(.82rem,2.3vh,1rem);line-height:1.6}
.nf404 .sk-btn{flex:none}
@media (prefers-reduced-motion:reduce){.lost *{animation:none!important}.lost .n4 path{stroke-dashoffset:0}.lost .stars circle{opacity:.6}.lost .q{opacity:0}}
@media (max-width:53.75em){.nf404{height:90vh;height:90dvh;margin-block:4vh;margin-block:4dvh}}
