/* =====================================================================
 * v3.68 design pack — big numbers, automatic covers, section identities,
 * rich footer, 404, reading mode, reveal on scroll, skeletons, focus ring.
 * Accent stays #41C48D with ink #0D0D0D; black blocks with offset shadows.
 * ===================================================================== */

/* ---------- Patterns (section identity) ---------- */
.pat-dots  { background-image: radial-gradient(var(--pc, rgba(13,13,13,.2)) 1.4px, transparent 1.6px); background-size: 12px 12px; }
.pat-grid  { background-image: linear-gradient(var(--pc, rgba(13,13,13,.2)) 1px, transparent 1px), linear-gradient(90deg, var(--pc, rgba(13,13,13,.2)) 1px, transparent 1px); background-size: 12px 12px; }
.pat-diag  { background-image: repeating-linear-gradient(45deg, var(--pc, rgba(13,13,13,.2)) 0 2px, transparent 2px 9px); }
.pat-plus  { background-image: linear-gradient(var(--pc, rgba(13,13,13,.2)) 2px, transparent 2px), linear-gradient(90deg, var(--pc, rgba(13,13,13,.2)) 2px, transparent 2px); background-size: 14px 14px; background-position: -6px -6px; }
.pat-rings { background-image: radial-gradient(circle, transparent 3px, var(--pc, rgba(13,13,13,.2)) 3.5px, var(--pc, rgba(13,13,13,.2)) 4.5px, transparent 5px); background-size: 14px 14px; }
.pat-waves { background-image: radial-gradient(circle at 50% 100%, transparent 5px, var(--pc, rgba(13,13,13,.2)) 5.5px, var(--pc, rgba(13,13,13,.2)) 7px, transparent 7.5px); background-size: 16px 9px; }
.id-tile { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; background-color: #41C48D; color: #0D0D0D; border: 2px solid #0D0D0D; }
.id-tile .id-ico { width: 18px; height: 18px; }

/* ---------- 2. Big numbers band ---------- */
.big-stats { background: #0D0D0D; color: #FFFDF8; border-block: 4px solid #41C48D; padding: 34px 0 30px; margin: 0; position: relative; overflow: hidden; }
.big-stats::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(65,196,141,.18) 1.4px, transparent 1.6px); background-size: 22px 22px; pointer-events: none; }
.big-stats .wrap { position: relative; }
.bs-kick { margin: 0 0 14px; font-size: 13px; font-weight: 900; letter-spacing: .02em; color: #41C48D; text-align: center; }
.bs-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.bs-cell { min-width: 0; container-type: inline-size; }
.bs-cell { border-inline-start: 2px solid rgba(65,196,141,.45); }
.bs-cell:first-child { border-inline-start: 0; }
html body .bs-link, .bs-cell > .bs-num { color: #FFFDF8 !important; text-decoration: none; }
.bs-link { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 10px 10px; transition: transform .15s; }
html body .bs-link:hover { transform: translateY(-3px); }
html body .bs-link:hover .bs-num { color: #5ED3A3; }
.bs-num { font-size: clamp(34px, 26cqw, 76px); white-space: nowrap; font-weight: 900; line-height: 1; color: #41C48D; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bs-lab { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: #FFFDF8; }
.bs-lab .id-ico { color: #41C48D; }
@media (max-width: 640px) {
	.big-stats { padding: 26px 0 18px; }
	.bs-row { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
	.bs-cell:nth-child(odd) { border-inline-start: 0; }
	.bs-cell:nth-child(n+3) { border-top: 2px solid rgba(65,196,141,.3); padding-top: 12px; }
	.bs-lab { font-size: 13px; }
}

/* ---------- 3. Automatic covers ---------- */
html body .card-thumb.has-ac { display: block; padding: 0; background: #0D0D0D !important; position: relative; container-type: inline-size; }
.ac { --pc: rgba(65,196,141,.26); position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6cqw; padding: 7cqw 7cqw 6cqw; background-color: #0D0D0D; color: #FFFDF8; overflow: hidden; direction: rtl; text-align: right; }
.ac::after { content: ""; position: absolute; inset-inline-end: -12cqw; bottom: -12cqw; width: 30cqw; height: 30cqw; z-index: 0; background: #41C48D; border: 2px solid #FFFDF8; transform: rotate(18deg); opacity: .95; }
.ac > * { position: relative; z-index: 1; }
.ac-top { display: flex; align-items: center; gap: 3cqw; }
.ac-ico { display: grid; place-items: center; width: 13cqw; height: 13cqw; min-width: 22px; min-height: 22px; background: #41C48D; color: #0D0D0D; border: 2px solid #FFFDF8; }
.ac-ico .id-ico { width: 62%; height: 62%; }
.ac-lab { font-size: max(10px, 5.4cqw); font-weight: 900; background: #FFFDF8; color: #0D0D0D; padding: .1em .55em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-t { font-weight: 900; line-height: 1.45; color: #FFFDF8; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; }
.ac-t--l { font-size: max(12px, 9.4cqw); -webkit-line-clamp: 3; }
.ac-t--m { font-size: max(11px, 7.6cqw); -webkit-line-clamp: 4; }
.ac-t--s { font-size: max(10px, 6.2cqw); -webkit-line-clamp: 5; }
.ac-foot { font-size: max(9px, 4.4cqw); line-height: 1.7; padding-bottom: .15em; font-weight: 800; color: #A7F3D0; max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac--book { padding: 9cqw 8cqw; border-inline-start: 7cqw solid #41C48D; }
.ac--book .ac-t--l { font-size: max(12px, 11cqw); -webkit-line-clamp: 5; }
.ac--book .ac-t--m { font-size: max(11px, 9cqw); -webkit-line-clamp: 6; }
.ac--book .ac-t--s { font-size: max(10px, 7.6cqw); -webkit-line-clamp: 7; }
.ac--book::after { width: 54cqw; height: 54cqw; bottom: -20cqw; }
.card:hover .ac::after { transform: rotate(26deg) scale(1.04); transition: transform .35s; }
@media (max-width: 640px) { .ac { gap: 4cqw; } .ac-foot { display: none; } }
.ac--wide { justify-content: flex-start; gap: 3.5cqw; padding: 5.5cqw 6cqw; }
.ac--wide .ac-t { line-height: 1.4; max-width: 86%; }
.ac--wide .ac-t--l { font-size: max(12px, 7cqw); -webkit-line-clamp: 2; }
.ac--wide .ac-t--m { font-size: max(11px, 6cqw); -webkit-line-clamp: 3; }
.ac--wide .ac-t--s { font-size: max(10px, 5.2cqw); -webkit-line-clamp: 3; }
.ac--wide .ac-foot { margin-top: auto; }
.ac--wide .ac-ico { width: 10cqw; height: 10cqw; }
.ac--wide .ac-lab { font-size: max(10px, 4.2cqw); }

/* ---------- 8. Rich footer ---------- */
html body .site-footer--rich { background: #0D0D0D !important; color: #E8E2D2; border-top: 6px solid #41C48D; margin-top: 48px; }
.site-footer--rich .ft-top { display: grid; grid-template-columns: minmax(260px, 1fr) 2.6fr; gap: 40px; padding: 46px 0 30px; }
.ft-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ft-brand img, .ft-brand .ft-logo { width: 54px; height: 54px; background: #FFFDF8; border: 2px solid #41C48D; padding: 3px; }
.ft-brand h2 { margin: 0; font-size: 22px; font-weight: 900; color: #FFFDF8; }
.ft-about p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.9; color: #CFC9BA; text-align: start; }
html body .site-footer--rich a.ft-news { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 16px; background: #41C48D; color: #0D0D0D !important; border: 2px solid #FFFDF8; box-shadow: 4px 4px 0 #FFFDF8; text-decoration: none; transition: transform .12s, box-shadow .12s; }
html body .site-footer--rich a.ft-news:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #FFFDF8; color: #0D0D0D !important; }
.ft-news span { display: flex; flex-direction: column; }
.ft-news b { font-size: 15px; font-weight: 900; }
.ft-news small { font-size: 12.5px; font-weight: 700; }
.fmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.fmap-col h3 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid #41C48D; font-size: 15px; font-weight: 900; color: #FFFDF8; }
.fmap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fmap li { padding: 0; }
html body .fmap a { display: flex; align-items: center; gap: 10px; color: #E8E2D2 !important; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.5; }
html body .fmap a:hover { color: #41C48D !important; }
html body .fmap a:hover .id-tile { transform: rotate(-6deg); }
.fmap .id-tile { width: 30px; height: 30px; border-color: #FFFDF8; transition: transform .15s; }
.fmap .id-tile .id-ico { width: 16px; height: 16px; }
.site-footer--rich .footer-bottom { border-top: 1px solid rgba(255,253,248,.18); color: #CFC9BA; }
@media (max-width: 980px) { .site-footer--rich .ft-top { grid-template-columns: 1fr; } .fmap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fmap { grid-template-columns: 1fr 1fr; gap: 20px 14px; } html body .fmap a { font-size: 13px; gap: 8px; } .fmap .id-tile { width: 26px; height: 26px; } }
/* light variant (404 page body) */
.fmap--light .fmap-col h3 { color: var(--ink); border-color: #0D0D0D; }
html body .fmap--light a { color: var(--ink) !important; }
html body .fmap--light a:hover { color: var(--ink) !important; text-decoration: underline; text-decoration-color: #41C48D; text-decoration-thickness: 2px; }
.fmap--light .id-tile { border-color: #0D0D0D; }
html[data-theme="dark"] .fmap--light .fmap-col h3 { border-color: #41C48D; }
html[data-theme="dark"] .fmap--light .id-tile { border-color: #41C48D; }

/* ---------- 5. 404 ---------- */
.nf { padding: 30px 0 10px; }
.nf-hero { display: grid; grid-template-columns: minmax(240px, .9fr) 1.3fr; align-items: center; gap: 34px; background: var(--card); border: 2px solid #0D0D0D; box-shadow: 6px 6px 0 #0D0D0D; padding: 30px; }
.nf-art { position: relative; display: grid; place-items: center; min-height: 260px; background: #0D0D0D; border: 2px solid #0D0D0D; overflow: hidden; }
.nf-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(65,196,141,.3) 1.4px, transparent 1.6px); background-size: 18px 18px; }
.nf-404 { position: absolute; font-size: clamp(110px, 16vw, 190px); font-weight: 900; line-height: 1; color: #41C48D; letter-spacing: -.04em; direction: ltr; opacity: .95; }
.nf-bot { position: relative; width: 62%; max-width: 210px; height: auto; filter: drop-shadow(0 10px 0 rgba(0,0,0,.35)); animation: nf-float 3.4s ease-in-out infinite; }
@keyframes nf-float { 50% { transform: translateY(-10px) rotate(-3deg); } }
.nf-kick { display: inline-block; background: #41C48D; color: #0D0D0D; border: 2px solid #0D0D0D; font-size: 13px; font-weight: 900; padding: 3px 10px; }
.nf-text h1 { margin: 10px 0 8px; font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; line-height: 1.35; }
.nf-text p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; line-height: 1.9; text-align: start; }
.nf-search { display: flex; gap: 10px; max-width: 560px; }
.nf-search input { flex: 1; min-width: 0; padding: 12px 14px; font: inherit; font-size: 15px; background: var(--card); color: var(--ink); border: 2px solid #0D0D0D; border-radius: 0; }
.nf-search .btn { background: #41C48D !important; color: #0D0D0D !important; border: 2px solid #0D0D0D; box-shadow: 3px 3px 0 #0D0D0D; font-weight: 900; }
html body .nf-home { display: inline-block; margin-top: 14px; font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: #41C48D; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.nf-sug, .nf-map { margin-top: 34px; }
.nf-sug h2, .nf-map h2 { font-size: 22px; font-weight: 900; margin: 0 0 14px; }
.nf-sug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.nf-map .fmap { background: var(--card); border: 2px solid #0D0D0D; padding: 22px; }
html[data-theme="dark"] .nf-hero, html[data-theme="dark"] .nf-map .fmap { border-color: #41C48D; box-shadow: 6px 6px 0 #2FA874; }
html[data-theme="dark"] .nf-map .fmap { box-shadow: none; }
html[data-theme="dark"] .nf-art { border-color: #41C48D; }
html[data-theme="dark"] .nf-search input { border-color: #41C48D; }
@media (max-width: 760px) {
	.nf-hero { grid-template-columns: 1fr; padding: 16px; gap: 18px; box-shadow: 4px 4px 0 #0D0D0D; }
	.nf-art { min-height: 200px; }
	.nf-search { flex-direction: column; }
}

/* ---------- 7. Reading mode ---------- */
.rd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
html body .rd-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13.5px; font-weight: 800; padding: 6px 12px; background: var(--card); color: var(--ink); border: 2px solid #0D0D0D; cursor: pointer; border-radius: 0; }
html body .rd-btn:hover { background: #E3F6EE; }
html body .rd-toggle[aria-pressed="true"] { background: #41C48D; color: #0D0D0D; }
.rd-size { display: inline-flex; }
.rd-size .rd-btn + .rd-btn { border-inline-start: 0; }
.rd-left { font-size: 13px; font-weight: 800; color: var(--muted); margin-inline-start: auto; }
.rd-progress { position: fixed; inset: 0 0 auto 0; height: 5px; z-index: 9999; pointer-events: none; background: transparent; }
.rd-progress i { display: block; height: 100%; background: #41C48D; transform: scaleX(0); transform-origin: right center; box-shadow: 0 1px 0 #0D0D0D; }
html[dir="ltr"] .rd-progress i { transform-origin: left center; }
body.rd-on .layout { grid-template-columns: 1fr !important; }
body.rd-on .layout > aside, body.rd-on .layout > .sidebar, body.rd-on #secondary, body.rd-on .related, body.rd-on .share, body.rd-on .post-tags { display: none !important; }
body.rd-on .article { max-width: 760px; margin-inline: auto; }
body.rd-on .entry { font-size: 19.5px; line-height: 2.15; max-width: 68ch; margin-inline: auto; }
body.rd-on .entry p { margin-bottom: 1.25em; }
body[data-rd-size="-1"] .entry { font-size: 15.5px; }
body[data-rd-size="1"] .entry { font-size: 19px; }
body[data-rd-size="2"] .entry { font-size: 21px; }
body[data-rd-size="3"] .entry { font-size: 23px; }
body.rd-on[data-rd-size="1"] .entry { font-size: 21.5px; }
body.rd-on[data-rd-size="2"] .entry { font-size: 23.5px; }
body.rd-on[data-rd-size="3"] .entry { font-size: 25.5px; }
html[data-theme="dark"] body .rd-btn { border-color: #41C48D; }
html[data-theme="dark"] body .rd-btn:hover { background: #12291F; }
html[data-theme="dark"] body .rd-toggle[aria-pressed="true"] { background: #41C48D; color: #0D0D0D; }

/* ---------- 1. Reveal on scroll ---------- */
html.rv-on .rv { opacity: 0; transform: translateY(22px); }
html.rv-on .rv.rv-in { opacity: 1; transform: none; transition: opacity .55s ease var(--rv-d, 0ms), transform .55s cubic-bezier(.2,.7,.2,1) var(--rv-d, 0ms); }
@media (prefers-reduced-motion: reduce) {
	html.rv-on .rv { opacity: 1 !important; transform: none !important; }
	.nf-bot { animation: none; }
	.bs-link, .ac::after, html body .site-footer--rich a.ft-news { transition: none !important; }
}

/* ---------- 6. Skeletons ---------- */
@keyframes skel-sh { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel, .skel-on { background: linear-gradient(90deg, rgba(13,13,13,.06) 25%, rgba(13,13,13,.14) 50%, rgba(13,13,13,.06) 75%) !important; background-size: 200% 100% !important; animation: skel-sh 1.2s linear infinite; }
html[data-theme="dark"] .skel, html[data-theme="dark"] .skel-on { background: linear-gradient(90deg, rgba(65,196,141,.06) 25%, rgba(65,196,141,.16) 50%, rgba(65,196,141,.06) 75%) !important; background-size: 200% 100% !important; }
.skel-on img { opacity: 0; transition: opacity .3s; }
.card-thumb img { transition: opacity .3s, transform .4s; }
.ds-skel { display: grid; gap: 8px; margin-top: 12px; }
.ds-skel .skel { display: block; height: 42px; border: 2px solid rgba(13,13,13,.18); }
.ds-skel .skel-l { height: 14px; width: 40%; border: 0; }
html[data-theme="dark"] .ds-skel .skel { border-color: rgba(65,196,141,.25); }
@media (prefers-reduced-motion: reduce) { .skel, .skel-on { animation: none; } }

/* ---------- 9. Focus ring (WCAG 2.4.7 / 2.4.11) ---------- */
html body :focus-visible { outline: 3px solid #0D0D0D !important; outline-offset: 2px !important; box-shadow: 0 0 0 6px #41C48D !important; border-radius: 0; }
html[data-theme="dark"] body :focus-visible { outline-color: #41C48D !important; box-shadow: 0 0 0 6px #0D0D0D !important; }
.big-stats :focus-visible, .site-footer--rich :focus-visible, .dlar-ticker :focus-visible { outline-color: #41C48D !important; box-shadow: 0 0 0 6px #0D0D0D !important; }
html body .skip-link:focus { background: #41C48D !important; color: #0D0D0D !important; border: 2px solid #0D0D0D; font-weight: 900; z-index: 100000; }

/* A centred thumb takes its width from the image; auto covers have none, so give them one. */
.card-thumb.has-ac { width: 100%; }
@media (max-width: 640px) { .book-card .card-thumb.has-ac { width: min(100%, 280px); } }
/* Book covers sit in landscape thumbs too: keep the green spine, use the wide sizes. */
.card-thumb .ac--book { justify-content: flex-start; gap: 3.5cqw; padding: 5.5cqw 6cqw; border-inline-start-width: 4cqw; }
.card-thumb .ac--book .ac-t { line-height: 1.4; max-width: 86%; }
.card-thumb .ac--book .ac-t--l { font-size: max(12px, 7cqw); -webkit-line-clamp: 2; }
.card-thumb .ac--book .ac-t--m { font-size: max(11px, 6cqw); -webkit-line-clamp: 3; }
.card-thumb .ac--book .ac-t--s { font-size: max(10px, 5.2cqw); -webkit-line-clamp: 3; }
.card-thumb .ac--book .ac-foot { margin-top: auto; }
.card-thumb .ac--book .ac-ico { width: 10cqw; height: 10cqw; }
.card-thumb .ac--book .ac-lab { font-size: max(10px, 4.2cqw); }
.card-thumb .ac--book::after { width: 30cqw; height: 30cqw; bottom: -12cqw; }

/* 3.69: hero has no side stats any more. */
html body .hero .wrap { grid-template-columns: 1fr; }
html body .hero .wrap > div:first-child { max-width: 860px; margin-inline: auto; }

/* 3.69: each big number in its own framed box with a green offset shadow. */
html body .bs-row { gap: 22px; padding: 4px 8px 10px 14px; }
html body .bs-cell, html body .bs-cell:first-child, html body .bs-cell:nth-child(odd) { border: 2px solid #FFFDF8; background: #0D0D0D; box-shadow: 7px 7px 0 #41C48D; }
html body .bs-cell:nth-child(n+3) { padding-top: 0; }
html body .bs-link { height: 100%; justify-content: center; padding: 16px 10px 18px; }
html body .bs-cell:hover { box-shadow: 4px 4px 0 #41C48D; transform: translate(3px, 3px); }
html body .bs-link:hover { transform: none; }
html body .bs-cell { transition: transform .15s, box-shadow .15s; }
@media (max-width: 640px) { html body .bs-row { gap: 16px; padding-inline: 2px 10px; } html body .bs-cell { box-shadow: 5px 5px 0 #41C48D; } }
@media (prefers-reduced-motion: reduce) { html body .bs-cell { transition: none; } html body .bs-cell:hover { transform: none; } }
@media (min-width: 641px) { html body .bs-row { grid-template-columns: repeat(3, 1fr); max-width: 1000px; margin-inline: auto; } }

/* 3.71: «ابدأ رحلتك» uses line icons from the section icon set, not emoji. */
html body .jr-ico, html body .jr-mini-ico { color: #0D0D0D; font-size: 0; }
html body .jr-ico .id-ico { width: 28px; height: 28px; stroke-width: 2.1; }
html body .jr-mini-ico .id-ico { width: 22px; height: 22px; }
html body .jr-goal:hover .jr-ico, html body .jr-goal:focus-visible .jr-ico { background: #0D0D0D; color: #41C48D; }
html[data-theme="dark"] body .jr-goal:hover .jr-ico, html[data-theme="dark"] body .jr-goal:focus-visible .jr-ico { background: #41C48D; color: #0D0D0D; }
@media (max-width: 640px) { html body .jr-ico .id-ico { width: 24px; height: 24px; } }

/* 3.74: owner's fixed figures (8 boxes): 4 columns on wide screens. */
@media (min-width: 981px) { html body .big-stats--many .bs-row { grid-template-columns: repeat(4, 1fr); max-width: 1180px; } }
@media (min-width: 641px) and (max-width: 980px) { html body .big-stats--many .bs-row { grid-template-columns: repeat(2, 1fr); } }
.bs-num { unicode-bidi: plaintext; }
