@font-face {
    font-family: "App Arabic";
    src: url("../fonts/El_Messiri/ElMessiri-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
:root {
    color-scheme: light;
    --primary: #a93d65;
    --ink: #4d2938;
    --muted: #7d5d6a;
    --border: #edcbd7;
    --surface: #fff9fb;
    --background: #fbeaf0;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 0 50%, #f7d5e2 0, transparent 55%), var(--background); color: var(--ink); font: 16px/1.75 Arial, sans-serif; }
html[lang="ar"] body { font-family: "App Arabic", Arial, sans-serif; }
a { color: var(--primary); text-underline-offset: 4px; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 16px; transform: translateY(-160%); padding: 10px 18px; background: white; z-index: 5; }
.skip-link:focus { transform: none; }
.site-header { background: #fff4f8; border-bottom: 1px solid var(--border); }
.header-inner, .page-shell, .site-footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); font-size: 18px; font-weight: 700; }
.brand img { object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 3px 5px #a93d6512); }
.header-caption { color: var(--primary); font-size: 12px; padding: 6px 16px; border: 1px solid var(--border); border-radius: 30px; }
.page-shell { min-height: calc(100svh - 205px); padding-block: 32px 64px; }
.page-intro { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 280px; padding: 42px 52px; margin-bottom: 32px; border: 1px solid #efbdcf; border-radius: 32px; overflow: hidden; background: linear-gradient(115deg, #f7cfde, #f5afc8); }
.page-intro::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid #fff6; border-radius: 50%; inset-inline-end: -140px; bottom: -180px; box-shadow: 0 0 0 30px #fff2, 0 0 0 60px #fff1; pointer-events: none; }
.intro-copy { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #79314c; font-size: 13px; font-weight: 700; }
.eyebrow > span { font-size: 22px; }
h1 { margin: 16px 0 12px; font-size: clamp(30px, 4vw, 46px); line-height: 1.4; letter-spacing: -.025em; color: #682b43; }
.intro-description { color: #793b52; font-size: 15px; margin: 0; }
.hero-flower { position: relative; display: grid; place-items: center; width: 230px; height: 230px; flex-shrink: 0; }
.hero-flower img { position: relative; width: 170px; height: 170px; object-fit: contain; transform: rotate(-12deg); filter: drop-shadow(0 14px 16px #9d3a6020); }
.flower-orbit { position: absolute; inset: 6px; border: 1px solid #fff9; border-radius: 50%; background: #fff3; box-shadow: 0 0 0 18px #fff2; }
.flower-spark { position: absolute; color: #a93d65; font: 24px/1 Arial, sans-serif; }
.spark-one { top: 18px; inset-inline-start: 10px; }
.spark-two { bottom: 17px; inset-inline-end: 13px; font-size: 16px; }
.page-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 28px; }
.page-nav { display: grid; gap: 10px; position: sticky; top: 24px; padding: 12px; border: 1px solid var(--border); background: #f7dce6; border-radius: 22px; }
.page-nav a { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 13px 12px; color: #754356; border: 1px solid transparent; border-radius: 14px; text-decoration: none; font-size: 14px; }
.nav-number { font: 11px/1 Arial, sans-serif; opacity: .7; }
.page-nav a:hover { background: #fff4f8; color: var(--primary); }
.page-nav a[aria-current="page"] { background: var(--primary); color: #fff9fb; font-weight: 700; box-shadow: 0 6px 16px #a93d6520; }
.nav-arrow { font-family: Arial, sans-serif; opacity: .8; margin-inline-start: auto; }
[dir="rtl"] .nav-arrow { transform: scaleX(-1); }
.content-card { min-width: 0; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); padding: clamp(24px, 4vw, 44px); box-shadow: 0 12px 36px #91335208; }
.content-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--primary); font-size: 13px; }
.content-heading > :first-child { font: 25px/1 Arial, sans-serif; }
.heading-rule { height: 1px; background: var(--border); flex: 1; }
.article-content { overflow-wrap: anywhere; line-height: 1.95; }
.article-content > :first-child { margin-top: 0; }
.article-content > :last-child { margin-bottom: 0; }
.article-content h1, .article-content h2, .article-content h3 { line-height: 1.5; margin-block: 30px 12px; color: #8f3657; }
.article-content h1 { font-size: 28px; }
.article-content h2 { font-size: 23px; }
.article-content h3 { font-size: 19px; }
.article-content p, .article-content ul, .article-content ol { margin-block: 0 20px; }
.article-content ul, .article-content ol { padding-inline-start: 25px; }
.article-content li { margin-block: 8px; }
.article-content li::marker { color: var(--primary); }
.article-content img, .article-content video, .article-content iframe { max-width: 100% !important; }
.article-content img, .article-content video { height: auto !important; }
.article-content pre { max-width: 100%; overflow-x: auto; }
.article-content table { display: block; width: 100% !important; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-content td, .article-content th { border: 1px solid var(--border); padding: 10px; }
.article-content blockquote { margin-inline: 0; border-inline-start: 3px solid var(--primary); padding-inline-start: 20px; color: var(--muted); }
.empty-content { color: var(--muted); }
.site-footer { border-top: 1px solid #e6bdce; padding-block: 26px; display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
@media (max-width: 760px) {
    .header-inner, .page-shell, .site-footer { width: calc(100% - 32px); }
    .header-inner { min-height: 76px; }
    .header-caption { display: none; }
    .page-shell { padding-block: 20px 36px; }
    .page-intro { min-height: 210px; padding: 28px 24px; margin-bottom: 20px; border-radius: 24px; gap: 8px; }
    .intro-copy { flex: 1; min-width: 0; }
    h1 { margin-block: 12px 10px; font-size: clamp(26px, 5vw, 34px); }
    .intro-description { font-size: 13px; }
    .hero-flower { width: 120px; height: 140px; }
    .hero-flower img { width: 105px; height: 105px; }
    .flower-orbit { inset: 14px 0; box-shadow: 0 0 0 9px #fff2; }
    .flower-spark { font-size: 16px; }
    .page-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .page-nav { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; border-radius: 18px; }
    .page-nav a { justify-content: center; text-align: center; padding: 10px 6px; font-size: 13px; border-radius: 12px; }
    .nav-arrow, .nav-number { display: none; }
    .content-card { border-radius: 16px; padding: 24px 20px; }
    .site-footer { flex-direction: column; align-items: start; gap: 8px; }
    .site-footer nav { gap: 4px 18px; }
}
@media (max-width: 420px) {
    .page-intro { padding: 24px 20px; }
    .hero-flower { position: absolute; inset-inline-end: -24px; top: -24px; opacity: .24; transform: rotate(14deg); width: 145px; height: 145px; }
    .hero-flower img { width: 125px; height: 125px; }
    .intro-copy { max-width: 100%; }
    .eyebrow { max-width: calc(100% - 40px); }
    .content-heading { margin-bottom: 22px; }
}
@media print {
    body { background: white; }
    .site-header, .page-nav, .site-footer, .skip-link { display: none; }
    .page-shell { width: 100%; padding: 0; }
    .page-grid { display: block; }
    .page-intro { background: white; min-height: 0; padding: 0; border: 0; }
    .hero-flower, .content-heading { display: none; }
    .content-card { border: 0; padding: 0; box-shadow: none; }
}
