﻿@font-face {
    font-family: 'Noto Naskh Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/noto-naskh-arabic-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Naskh Arabic';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/noto-naskh-arabic-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Naskh Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/noto-naskh-arabic-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Naskh Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/noto-naskh-arabic-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Scheherazade New';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/scheherazade-new-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Scheherazade New';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/scheherazade-new-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Scheherazade New';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/scheherazade-new-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/cairo-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/cairo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/cairo-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --color-primary: #70a436;
    --color-primary-dark: #2b4f02;
    --color-primary-light: #c4e1a3;
    --color-btn: var(--color-primary);
    --color-btn-dark: var(--color-primary-dark);
    --color-btn-light: var(--color-primary-light);
    --color-btn-text: #ffffff;
    --on-primary: #ffffff;
    --color-bg: #fbf8ef;
    --color-surface: #fffde7;
    --color-text: #303030;
    --color-heading: #242424;
    --color-muted: #6c757d;
    --color-border: #dee2e6;
    --font-arabic: 'Cairo', sans-serif;
    --font-quran: 'Amiri', serif;
    --bs-primary: var(--color-btn);
    --bs-primary-rgb: 112, 164, 54;
    --bs-pagination-active-bg: var(--color-btn);
    --bs-pagination-active-border-color: var(--color-btn);
}

[data-theme="dark"] {
    --color-primary: #9ccd5e;
    --color-primary-dark: #c4e1a3;
    --color-primary-light: #5c8a28;
    --color-btn: var(--color-primary);
    --color-btn-dark: var(--color-primary-dark);
    --color-btn-light: var(--color-primary-light);
    --color-btn-text: #1b1f28;
    --on-primary: #1b1f28;
    --color-bg: #12141a;
    --color-surface: #1b1f28;
    --color-text: #e6e6e6;
    --color-heading: #ffffff;
    --color-muted: #a0a6b0;
    --color-border: #2a2f3a;
    --bs-primary-rgb: 156, 205, 94;
}

[data-theme="dark"] body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

[data-theme="dark"] .main-navbar,
[data-theme="dark"] .navbar {
    background-color: var(--color-surface) !important;
}

[data-theme="dark"] .navbar .nav-link,
[data-theme="dark"] .navbar .navbar-brand {
    color: var(--color-text) !important;
}

[data-theme="dark"] .site-main,
[data-theme="dark"] .container,
[data-theme="dark"] section,
[data-theme="dark"] footer,
[data-theme="dark"] .card,
[data-theme="dark"] .page-title,
[data-theme="dark"] .result-list li {
    background-color: var(--color-bg);
    color: var(--color-text);
}

[data-theme="dark"] .card {
    background-color: var(--color-surface) !important;
    border-color: var(--color-border) !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--color-heading);
}

[data-theme="dark"] a {
    color: var(--color-primary);
}

[data-theme="dark"] .text-muted {
    color: var(--color-muted) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .header-announcement {
    background-color: var(--color-surface);
    color: var(--color-text);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-arabic);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    overflow-x: hidden;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ===== Topbar ===== */
.topbar {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    padding: 8px 0;
    font-size: 0.95rem;
}

.topbar a {
    color: #fff;
    margin-inline-start: 12px;
    font-size: 1.1rem;
    transition: transform 0.3s;
    display: inline-block;
}

.topbar a:hover {
    transform: translateY(-2px);
    color: var(--color-primary-light);
}

.topbar-date { font-weight: 600; }
.topbar-social { text-align: left; }
.topbar-search { margin-inline-start: 0; }

/* ===== Navbar ===== */
.main-navbar {
    background-color: var(--color-surface);
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    padding: 12px 0;
    min-height: 65px;
    z-index: 1050;
    position: sticky;
    top: 0;
}

.main-navbar .container { flex-wrap: wrap; }

.site-main {
    padding-top: 8px;
}

.brand-logo {
    height: 55px;
    max-width: 220px;
}

.main-navbar .navbar-nav .nav-link {
    color: var(--color-text);
    font-weight: 600;
    padding-inline: 14px;
    font-size: 1rem;
    transition: color 0.3s;
}

.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .nav-link.active {
    color: var(--color-primary);
}

.navbar-toggler {
    border: none;
    color: var(--color-primary-dark);
    font-size: 1.5rem;
}

/* ===== Mobile quick cluster (menu / search / theme) ===== */
.nav-quick-cluster {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-icon-btn {
    border: none;
    background: transparent;
    color: var(--color-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    transition: background 0.25s, color 0.25s, transform 0.2s;
}

.nav-icon-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-primary);
}

.nav-icon-btn:active {
    transform: scale(0.9);
}

[data-theme="dark"] .nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .navbar-toggler i {
    color: var(--color-text);
}

/* ===== Mobile navigation drawer ===== */
#mainDrawer {
    --bs-offcanvas-bg: var(--color-surface);
    --bs-offcanvas-color: var(--color-text);
    --bs-offcanvas-width: min(74vw, 320px);
    z-index: 1060;
    top: 0;
    right: 0;
    left: auto;
    width: var(--bs-offcanvas-width, min(74vw, 320px));
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

#mainDrawer.show {
    transform: translateX(0);
}

#mainDrawer .main-drawer-header {
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
    padding: 16px 18px;
    align-items: center;
    flex-shrink: 0;
}

#mainDrawer .main-drawer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 9px;
}

#mainDrawer .main-drawer-body {
    padding: 10px 16px 28px;
    overflow-y: auto;
}

#mainDrawer .main-drawer-nav {
    flex-wrap: nowrap;
}

#mainDrawer .main-drawer-nav .nav-link,
#mainDrawer .main-drawer-nav .dropdown-item,
#mainDrawer .main-drawer-nav .dropdown-header {
    color: var(--color-text);
    white-space: normal;
    border: none;
    box-shadow: none;
}

#mainDrawer .main-drawer-nav > .nav-item > .nav-link {
    font-weight: 700;
    font-size: 1rem;
    padding: 13px 12px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
    display: flex;
    align-items: center;
    gap: 8px;
}

#mainDrawer .main-drawer-nav .nav-link:hover,
#mainDrawer .main-drawer-nav .nav-link.active {
    color: var(--color-primary);
}

#mainDrawer .dropdown-menu {
    position: static !important;
    transform: none !important;
    inset: 0 auto auto 0 !important;
    display: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 4px 10px;
    margin: 0;
    max-height: none;
    overflow: visible;
}

#mainDrawer .dropdown-menu.show {
    display: block;
}

#mainDrawer .main-drawer-nav .dropdown-item {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

#mainDrawer .main-drawer-nav .dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

#mainDrawer .main-drawer-nav .dropdown-header {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 14px 6px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

#mainDrawer .dropdown-divider {
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

#mainDrawer .main-drawer-nav .dropdown-toggle {
    cursor: pointer;
    transition: color 0.2s;
}

#mainDrawer .main-drawer-nav .dropdown-toggle::after {
    margin-inline-start: auto;
    transition: transform 0.25s;
}

#mainDrawer .main-drawer-nav .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.categories-menu {
    max-height: 70vh;
    overflow-y: auto;
    width: 340px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding-bottom: 8px;
}

.categories-menu .dropdown-item {
    white-space: normal;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.categories-menu .dropdown-item:last-child {
    border-bottom: none;
}

.categories-menu .dropdown-item:hover {
    background-color: var(--color-bg);
    color: var(--color-primary-dark);
}

.nav-cat-menu {
    max-height: 70vh;
    overflow-y: auto;
    width: 340px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding-bottom: 8px;
}

.nav-cat-menu .dropdown-item {
    white-space: normal;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.nav-cat-menu .dropdown-item:last-child {
    border-bottom: none;
}

.nav-cat-menu .dropdown-item:hover {
    background-color: var(--color-bg);
    color: var(--color-primary-dark);
}

.logout-btn-link {
    width: 100%;
    text-align: start;
    background: none;
    border: 0;
    padding: .35rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.logout-btn-link:hover {
    background-color: var(--color-bg);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #4a7a20 100%);
    border-radius: 18px;
    padding: 48px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.hero-intro {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 760px;
    margin-inline: auto;
    text-align: justify;
    position: relative;
}

.hero-actions .btn {
    border-radius: 50px;
    padding-inline: 24px;
    font-weight: 600;
}

.hero-cells {
    margin-top: 30px;
    position: relative;
}

.hero-cells .col {
    display: flex;
}

.hero-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 18px 14px;
    color: #fff;
    text-decoration: none;
    transition: background 0.25s, transform 0.25s;
}

.hero-cell:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-3px);
}

.hero-cell i {
    font-size: 2rem;
    line-height: 1;
}

.hero-cell-img {
    height: 58px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.hero-cell-title {
    font-weight: 700;
    font-size: 1.05rem;
}

/* ===== Section Headers ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-inline-start: 5px solid var(--color-primary);
    padding-inline-start: 16px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-heading);
    margin: 0;
}

.section-header h2 i {
    color: var(--color-primary);
}

.section-header h2 a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 a:hover {
    color: var(--color-primary);
}

.section-header .view-all {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== Post Cards ===== */
.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(112,164,54,0.15);
    border-color: var(--color-primary-light);
}

.post-card-body {
    padding: 20px;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 12px 0 10px;
    color: var(--color-heading);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2em;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
    color: var(--color-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 20px;
    border-top: 1px solid #f5f5f5;
    background: #fdfdf9;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post-date {
    color: var(--color-muted);
    font-size: 0.82rem;
}

.post-read-time {
    color: var(--color-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.post-card-footer .btn-read-more {
    white-space: nowrap;
}

.post-cat {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
}

.post-card-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.post-card-tags .post-cat {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.post-card-tags .post-episode {
    flex-shrink: 0;
}

.post-num {
    background-color: #f0e9c9;
    color: #6b5d1b;
    font-weight: 700;
}

.btn-read-more {
    color: var(--color-primary);
    font-weight: 600;
}
.btn-read-more:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* ===== Category Cards ===== */
.cat-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.cat-card::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.cat-card:hover::after { transform: scaleY(1); }

.cat-card:hover {
    box-shadow: 0 8px 25px rgba(112,164,54,0.18);
    transform: translateY(-3px);
}

.cat-card-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 12px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-inline-end: 14px;
}

.cat-card-body h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 3px;
    line-height: 1.4;
}

.cat-card-body span {
    color: var(--color-muted);
    font-size: 0.82rem;
}

.cat-card-arrow {
    margin-inline-start: auto;
    color: var(--color-primary);
    font-size: 1.2rem;
}

/* ===== About card ===== */
.about-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.about-img {
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    max-height: 220px;
}

.about-card h4 { color: var(--color-primary-dark); font-weight: 800; }

/* ===== Page title ===== */
.page-title {
    margin-bottom: 30px;
}

.page-title h1 {
    font-weight: 800;
    color: var(--color-heading);
    font-size: 1.9rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 4px;
    margin-top: 8px;
}

/* ===== Single Post ===== */
.single-post {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.single-post-header {
    padding-bottom: 18px;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 14px;
}

.single-post-header h1 {
    font-family: var(--font-quran);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 14px 0 12px;
    line-height: 1.6;
}

.single-post-meta {
    display: flex;
    gap: 18px;
    color: var(--color-muted);
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.single-post-content {
    font-family: var(--font-quran);
    font-size: 1.05rem;
    line-height: 1.85;
    color: #26262a;
    margin-top: 24px;
    overflow-wrap: break-word;
}

.single-post-content p {
    margin-bottom: 1.1rem;
    line-height: 1.85;
}

.single-post-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Student manual highlight (yellow markup) */
.single-post-content mark.student-hl {
    background: #fff176;
    color: inherit;
    padding: 0 1px;
    border-radius: 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    cursor: pointer;
}
[data-theme="dark"] .single-post-content mark.student-hl {
    background: #8a7d1a;
    color: #fff;
}

/* Floating highlight button shown on touch selections */
.hl-float-btn {
    position: fixed;
    z-index: 10000;
    background: #0e7490;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    cursor: pointer;
    touch-action: none;
}
.hl-float-btn:active { transform: scale(.96); }
[data-theme="dark"] .hl-float-btn { background: #155e75; }


/* ===== Tags ===== */
.post-tags { margin-top: 20px; }

.tag-badge {
    background-color: var(--color-bg);
    color: var(--color-primary-dark);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    margin-inline-end: 6px;
    margin-bottom: 6px;
}
a.tag-badge:hover { background-color: var(--color-primary); color: #fff; }

/* ===== Share box ===== */
.share-box {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 20px;
}

.share-box h5 { color: var(--color-heading); font-weight: 700; }

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.share-btn:hover { transform: translateY(-2px); opacity: 0.92; }

.share-whatsapp { background: #25d366; }
.share-telegram { background: #1e96c8; }
.share-facebook { background: #1b4994; }
.share-twitter  { background: #0f1419; }

/* ===== Sidebar ===== */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    position: sticky;
    top: 90px;
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-heading);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-bg);
    margin-bottom: 14px;
}

.related-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-posts li { margin-bottom: 4px; }

.related-posts a {
    display: block;
    padding: 8px 6px;
    color: var(--color-text);
    font-size: 0.92rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.related-posts a:hover {
    background: var(--color-bg);
    color: var(--color-primary-dark);
}

.related-posts a i { color: var(--color-primary); font-size: 0.7rem; }

/* ===== Lesson Cards ===== */
.lesson-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.lesson-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.lesson-card-body { padding: 20px; flex-grow: 1; }
.lesson-card-body h4 { font-size: 1rem; font-weight: 700; }
.lesson-card-body h4 a { color: var(--color-heading); }
.lesson-card-body h4 a:hover { color: var(--color-primary); }

.lesson-card-footer {
    padding: 12px 20px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    gap: 10px;
}

.btn-listen {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}
.btn-listen:hover { background: var(--color-primary-dark); color: #fff; }

.audio-player {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.btn-download {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-weight: 600;
}
.btn-download:hover { background: var(--color-primary); color: #fff; }

/* ===== Fatwa ===== */
.fatwa-question {
    background: #fef9e7;
    border-inline-start: 4px solid #f39c12;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.fatwa-question h5, .fatwa-answer h5 { font-weight: 800; }

.fatwa-answer {
    background: #f2f9ec;
    border-inline-start: 4px solid var(--color-primary);
    border-radius: 10px;
    padding: 20px;
    font-family: var(--font-quran);
    font-size: 0.95rem;
    line-height: 1.95;
    text-align: justify;
}

/* ===== Books ===== */
.book-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    text-align: center;
    padding: 24px;
    transition: all 0.3s;
}

.book-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-4px); }

.book-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 14px;
}

.book-card-body h4 { font-size: 1.05rem; font-weight: 700; color: var(--color-heading); }
.book-author { color: var(--color-muted); font-size: 0.85rem; }

/* ===== Search results ===== */
.search-results-count {
    background: #fff;
    padding: 14px 20px;
    border-radius: 10px;
}

.results-section-title {
    font-weight: 800;
    color: var(--color-primary-dark);
    margin: 28px 0 14px;
    font-size: 1.25rem;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.results-list li {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.25s;
}

.results-list li:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); border-color: var(--color-primary-light); }

.results-list a { display: block; padding: 16px 20px; }

.result-title { font-weight: 700; color: var(--color-heading); margin-bottom: 4px; }
.result-title:hover { color: var(--color-primary); }
.result-excerpt { color: var(--color-muted); font-size: 0.9rem; }
.result-meta { margin-top: 8px; font-size: 0.82rem; color: var(--color-muted); }
.result-date { margin-inline-start: 10px; }

.search-result-item {
    display: block;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.search-result-item:hover { border-color: var(--color-primary); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }

.search-result-title { color: var(--color-heading); font-weight: 600; }
.search-no-result { text-align: center; color: var(--color-muted); padding: 20px; }

/* ===== Footer ===== */
.site-footer {
    background: var(--color-primary-dark);
    color: #fff;
    padding-top: 40px;
    margin-top: 40px;
}

.site-footer h5 {
    color: var(--color-primary-light);
    font-weight: 800;
    margin-bottom: 16px;
}

.site-footer p { color: #c9d8b8; font-size: 0.92rem; }

/* Editable header/footer extras + ad banner */
.header-announcement {
    background: #fff7e6;
    color: #7a5600;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid #f0d79a;
}
[data-theme="dark"] .header-announcement {
    background: #3a2f10;
    color: #ffd873;
    border-bottom-color: #6b5810;
}
.ad-banner-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 16px 10px;
    background: #fafafa;
}
[data-theme="dark"] .ad-banner-wrap { background: #1b2230; }
.ad-banner {
    max-width: 100%;
    max-height: 100px;
    border-radius: 10px;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.ad-banner-wrap a:hover .ad-banner { box-shadow: 0 4px 18px rgba(0,0,0,0.25); }
.footer-extra-html {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.18);
    text-align: center;
    color: #e6f4e9;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.footer-links a:hover { color: var(--color-primary-light); padding-inline-start: 4px; }
.footer-links a i { font-size: 0.7rem; }

.footer-social a {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-inline-end: 10px;
    font-size: 1.15rem;
    transition: all 0.3s;
}

.footer-social a:hover { background: var(--color-primary); transform: translateY(-3px); }

.footer-bottom {
    background: rgba(0,0,0,0.25);
    padding: 16px 0;
    margin-top: 32px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== WhatsApp float ===== */
.whatsapp-float {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 30px;
    inset-inline-start: 30px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    z-index: 999;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
}

/* ===== Back to top ===== */
.back-to-top {
    position: fixed;
    width: 46px;
    height: 46px;
    bottom: 30px;
    inset-inline-end: 30px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}
@media (max-width: 576px) {
    .back-to-top { bottom: 22px; inset-inline-end: 18px; width: 42px; height: 42px; }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.breadcrumb a { color: var(--color-primary); }
.breadcrumb .active { color: var(--color-muted); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .topbar-social { text-align: right; margin-top: 6px; }
    .hero-section { padding: 32px 24px; }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-intro { font-size: 1rem; }
    .nav-cat-menu { width: 100%; max-height: 60vh; overflow-y: auto; }
    .navbar-collapse .dropdown-menu {
        position: static;
        width: 100% !important;
        max-height: 50vh;
        overflow-y: auto;
        box-shadow: none;
    }
    .navbar-collapse .dropdown-toggle::after {
        float: inline-end;
        margin-top: 8px;
    }
    .mobile-nav-search a {
        color: var(--color-text);
        font-size: 1.2rem;
        display: inline-block;
        padding: 6px 10px;
    }
}

/* Desktop: two-column header — right column (58%) holds the bigger logo,
   a second slimmer column (42%) holds the nav links. */
@media (min-width: 993px) {
    .main-navbar .container { justify-content: flex-start; align-items: center; flex-wrap: nowrap; }
    .main-navbar .navbar-brand { flex: 0 0 58%; max-width: 58%; }
    .main-navbar .brand-logo { height: 72px; max-width: 260px; }
    .main-navbar .header-nav-col { flex: 1 1 auto; }
    .main-navbar .navbar-nav { flex-wrap: nowrap; justify-content: flex-start; }
    .main-navbar .navbar-nav .nav-link { padding-inline: 12px; font-size: 1rem; }
}

@media (max-width: 576px) {
    .categories-menu { max-height: 55vh; }
    .main-navbar .navbar-nav .nav-link { padding-inline: 10px; font-size: 0.9rem; }
    .main-navbar .container { flex-wrap: nowrap; }
    .main-navbar .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 132px);
        margin-inline-end: 8px !important;
    }
    .main-navbar .brand-logo { height: 52px; max-width: 100%; }
    .main-navbar .nav-quick-cluster { flex: 0 0 auto; gap: 0; }
    .main-navbar .nav-quick-cluster .nav-icon-btn { width: 38px; height: 38px; font-size: 1.05rem; }
}

/* ===== Most viewed ===== */
.most-viewed-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.25s;
    color: var(--color-text);
}

.most-viewed-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    color: var(--color-text);
}

.mv-rank {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.mv-body { flex: 1; min-width: 0; }

.mv-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.most-viewed-card:hover .mv-title { color: var(--color-primary); }

.mv-meta {
    font-size: 0.78rem;
    color: var(--color-muted);
}

.mv-arrow { color: var(--color-primary); font-size: 0.85rem; }

/* ===== Books slider ===== */
#booksSlider {
    background: linear-gradient(135deg, #fdfcfb, #f7f4ef);
    border-radius: 16px;
    padding: 28px 44px 14px;
    border: 1px solid #eee;
}

.book-slide-card {
    text-align: center;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.25s;
    height: 100%;
}

.book-slide-card:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.book-cover-art {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-primary), #14532d);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(20, 83, 45, 0.3);
    margin-bottom: 10px;
}

.book-cover-art i { font-size: 2rem; opacity: 0.85; }

.book-cover-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-cover-img { margin-bottom: 10px; height: 150px; }

.book-cover-img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.book-slide-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}

.btn-book-download {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.78rem;
    border-radius: 50px;
}

.btn-book-download:hover { background: var(--color-primary-dark); color: #fff; }

#booksSlider .carousel-control-prev,
#booksSlider .carousel-control-next {
    width: 36px;
    height: 36px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 83, 45, 0.9);
    border-radius: 50%;
    inset-inline: -38px auto;
}

#booksSlider .carousel-control-prev { inset-inline: -38px auto; }
#booksSlider .carousel-control-next { inset-inline: auto -38px; }

@media (max-width: 576px) {
    #booksSlider { padding: 20px 34px 10px; }
    #booksSlider .carousel-control-prev,
    #booksSlider .carousel-control-next { display: none; }
    .book-cover-art, .book-cover-img, .book-cover-img img { height: 120px; }
}

/* ===== Post font size controls ===== */
.font-size-label {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-weight: 600;
}

.font-btn {
    border-radius: 8px;
    font-weight: 700;
    padding: 4px 12px;
}

.post-font-controls {
    position: sticky;
    top: 106px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f4fbf5;
    border: 1px solid #cfe8d5;
    border-radius: 12px;
    padding: 8px 14px;
    margin: 12px 0 14px;
    box-shadow: 0 4px 12px rgba(20, 83, 45, 0.08);
}

.post-action-divider {
    width: 1px;
    height: 22px;
    background: #cfe8d5;
    margin-inline: 2px;
}

[data-theme="dark"] .post-action-divider {
    background: #3a4a2f;
}

.single-post-content .media-player {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 18px;
    margin: 18px 0;
}

.single-post-content .media-player audio {
    width: 100%;
}

.post-view-count {
    background: rgba(20, 83, 45, 0.08);
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px dashed var(--color-primary);
}

.share-copy { background: #6c757d; }

.share-copy:hover { background: #565e64; }

/* ===== Home custom HTML box ===== */
.home-html-box {
    background: #fff;
    border: 1px solid #e3ecdf;
    border-inline-start: 4px solid var(--color-primary);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    line-height: 1.8;
    overflow-wrap: break-word;
}
.home-html-box img { max-width: 100%; height: auto; border-radius: 8px; }
.home-html-box .media-player audio { width: 100%; }

@media (max-width: 576px) {
    .single-post { padding: 20px; }
    .single-post-header h1 { font-size: 1.4rem; }
    .page-title h1 { font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fatwa-answer { font-size: 0.88rem; padding: 14px; line-height: 1.85; }
    .fatwa-question { padding: 14px; }
    .post-font-controls {
        position: sticky;
        top: 70px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        white-space: nowrap;
        cursor: grab;
        touch-action: pan-y;
        overscroll-behavior-x: contain;
        -webkit-user-select: none;
        user-select: none;
    }
    .post-font-controls:active { cursor: grabbing; }
    .post-font-controls::-webkit-scrollbar { display: none; }
    .post-font-controls .font-size-label,
    .post-font-controls .font-btn { flex: 0 0 auto; }
    .post-action-divider { flex: 0 0 auto; }
    .brand-logo { height: 44px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .mv-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-weight: 700;
        font-size: 1.05rem;
    }
    .mv-body { display: block; }
    .most-viewed-card { justify-content: flex-start; padding: 12px; }
    .site-footer .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 18px;
    }
    .site-footer .footer-links li { margin-bottom: 0; }
    .site-footer .footer-links a { display: inline-flex; align-items: center; }
    .site-footer .footer-social { justify-content: center; display: flex; }
    .site-footer .footer-social a { margin-inline-end: 14px; }
    .site-footer h5 { text-align: center; }
}

/* ===== Dark mode ===== */
[data-theme="dark"] {
    --color-bg: #131a12;
    --color-surface: #1c2419;
    --color-text: #e6ead7;
    --color-heading: #f2f5e8;
    --color-muted: #a9b4a0;
    --color-primary-light: #6d9446;
}

[data-theme="dark"] body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

[data-theme="dark"] .main-navbar {
    background-color: #1c2419;
}

[data-theme="dark"] .main-navbar .navbar-nav .nav-link {
    color: var(--color-text);
}

[data-theme="dark"] .categories-menu {
    background: #1c2419;
    border: 1px solid #2b3628;
}

[data-theme="dark"] .categories-menu .dropdown-item {
    color: var(--color-text);
    border-bottom: 1px solid #2b3628;
}

[data-theme="dark"] .categories-menu .dropdown-item:hover {
    background: #25301f;
    color: var(--color-primary-light);
}

[data-theme="dark"] .navbar-toggler i {
    color: var(--color-text);
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .cat-card,
[data-theme="dark"] .about-card,
[data-theme="dark"] .single-post,
[data-theme="dark"] .sidebar-widget,
[data-theme="dark"] .lesson-card,
[data-theme="dark"] .book-card,
[data-theme="dark"] .search-results-count,
[data-theme="dark"] .results-list li,
[data-theme="dark"] .search-result-item,
[data-theme="dark"] .most-viewed-card,
[data-theme="dark"] .book-slide-card:hover,
[data-theme="dark"] .home-html-box,
[data-theme="dark"] .dorous-card {
    background: #1c2419;
    border-color: #2b3628;
    color: var(--color-text);
}

[data-theme="dark"] .post-card-footer {
    background: #20291c;
    border-top-color: #2b3628;
}

[data-theme="dark"] .post-card-title a {
    color: var(--color-heading);
}

[data-theme="dark"] .single-post-content {
    color: #e2e7d6;
}

[data-theme="dark"] .single-post-header h1,
[data-theme="dark"] .section-header h2,
[data-theme="dark"] .cat-card-body h4,
[data-theme="dark"] .mv-title,
[data-theme="dark"] .book-slide-title,
[data-theme="dark"] .book-card-body h4,
[data-theme="dark"] .page-title h1,
[data-theme="dark"] .sidebar-title,
[data-theme="dark"] .lesson-card-body h4 a,
[data-theme="dark"] .result-title,
[data-theme="dark"] .search-result-title,
[data-theme="dark"] .share-box h5 {
    color: var(--color-heading);
}

[data-theme="dark"] .related-posts a {
    color: var(--color-text);
}

[data-theme="dark"] .post-cat {
    background: #40592e;
    color: #f0f7e6;
}

[data-theme="dark"] .post-episode {
    background: #3a3318;
    color: #e8d98c;
}

[data-theme="dark"] .tag-badge {
    background: #25301f;
    color: var(--color-primary-light);
}

[data-theme="dark"] #booksSlider {
    background: linear-gradient(135deg, #1c2419, #20291c);
    border-color: #2b3628;
}

[data-theme="dark"] .post-font-controls {
    background: #20291c;
    border-color: #3a4a2f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fatwa-question {
    background: #2c2515;
    border-inline-start-color: #f39c12;
}

[data-theme="dark"] .fatwa-answer {
    background: #1f2b1a;
}

[data-theme="dark"] .share-box,
[data-theme="dark"] .audio-player,
[data-theme="dark"] .single-post-content .media-player {
    background: #20291c;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #20291c;
    color: var(--color-text);
    border-color: #3a4a2f;
}

[data-theme="dark"] .form-control:focus {
    background-color: #20291c;
    color: var(--color-text);
}

[data-theme="dark"] .breadcrumb .active {
    color: var(--color-muted);
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu {
    background-color: #1c2419;
    color: var(--color-text);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #2b3628;
}

[data-theme="dark"] .pagination .page-link {
    background-color: #20291c;
    color: var(--color-text);
    border-color: #3a4a2f;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

[data-theme="dark"] .alert {
    background-color: #20291c;
    border-color: #3a4a2f;
    color: var(--color-text);
}

[data-theme="dark"] .alert-info {
    background-color: #1f2b2c;
    border-color: #2f4749;
    color: #cfe8ea;
}

[data-theme="dark"] .alert-link {
    color: #9fd7da;
}

[data-theme="dark"] .book-cover-art {
    background: linear-gradient(135deg, #46683a, #123325);
}

[data-theme="dark"] .book-detail-card {
    background: #1c2419;
    border-color: #2b3628;
}

[data-theme="dark"] .book-detail-title {
    color: var(--color-heading);
}

[data-theme="dark"] .book-detail-desc {
    color: var(--color-text);
}

[data-theme="dark"] .search-results .search-result-item {
    background: #1c2419;
    border-color: #2b3628;
}

[data-theme="dark"] .results-section-title {
    color: var(--color-primary-light);
}

[data-theme="dark"] .scroll-top-btn {
    background: #2b3628;
    color: var(--color-text);
}

[data-theme="dark"] ::placeholder {
    color: #7c8575;
}

[data-theme="dark"] .text-muted {
    color: var(--color-muted) !important;
}

[data-theme="dark"] .topbar-theme a {
    color: #fff;
}

/** New book page + dorous card + episode badge + book cards (light) **/
.dorous-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.dorous-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.dorous-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.dorous-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 8px 0 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dorous-card-title a { color: var(--color-heading); }
.dorous-card-title a:hover { color: var(--color-primary); }

.dorous-icon {
    color: var(--color-primary);
    font-size: 1.4rem;
    padding-top: 4px;
}

.dorous-audio audio {
    width: 100%;
    border-radius: 8px;
}

.post-episode {
    background-color: #f0e9c9;
    color: #6b5d1b;
    font-weight: 700;
    margin-inline-start: 6px;
}

.book-slide-link { display: block; text-decoration: none; }

.book-slide-link:hover .book-slide-card {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.book-detail-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.book-detail-cover {
    max-width: 260px;
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.book-cover-fallback {
    max-width: 260px;
    margin: 0 auto;
    width: 100%;
    height: 340px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), #14532d);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.book-detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.book-detail-author {
    color: var(--color-primary-dark);
    font-weight: 600;
    font-size: 1rem;
}

[data-theme="dark"] .book-detail-author {
    color: var(--color-primary-light);
}

.book-detail-desc {
    color: var(--color-text);
    line-height: 1.9;
    margin-top: 14px;
    font-family: var(--font-quran);
}

.book-card-cover { height: 200px; margin-bottom: 14px; }

.book-card-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.book-card-cover .book-cover-fallback,
.book-card-cover .book-cover-fallback i {
    height: 100%;
    border-radius: 10px;
}

.book-card-cover-link { display: block; }
.book-card-cover-link:hover { opacity: 0.95; }

.book-card-footer {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.book-card-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.7;
    min-height: 3.1em;
}

.book-card-footer .btn + .btn,
.book-card-footer a.btn { margin-inline-start: auto; }

.topbar-theme { margin-inline-start: 0; }

@media (max-width: 576px) {
    .book-detail-card { padding: 20px; }
    .book-detail-cover, .book-cover-fallback { max-width: 220px; height: 300px; }
}

.book-filter-bar,
.books-author-bar { gap: .5rem; }

.books-author-bar .btn.active { background: var(--color-heading, #0d6efd); color: #fff; border-color: transparent; }

.book-meta-bar { color: #6c757d; }

.book-stars a { text-decoration: none; font-size: 1.15rem; }
.book-stars a i.fa-star { text-shadow: 0 1px 3px rgba(0,0,0,.08); }

.stat-box {
    border: 1px solid #e9ecef;
    border-radius: .5rem;
    padding: .5rem .75rem;
    text-align: center;
    background: #fff;
}
.stat-box .stat-num { display: block; font-size: 1.25rem; font-weight: 700; color: var(--color-heading, #0d6efd); }
.stat-box .stat-label { font-size: .78rem; color: #6c757d; }
.stat-box.stat-warn { border-color: #fd7e14; background: #fff7ed; }
.stat-box.stat-warn .stat-num { color: #dc3545; }

.action-btn.btn-view { background: #e9ecef; color: #495057; }

[data-theme="dark"] .stat-box { background: #1f2937; border-color: #374151; }
[data-theme="dark"] .stat-box .stat-label { color: #9ca3af; }
[data-theme="dark"] .stat-box.stat-warn { background: rgba(220,53,69,.12); border-color: #dc3545; }

/* ---- Custom HTML boxes (homepage + settings manager) ---- */
.home-box-row { border-radius: .6rem; }
.home-box-row .card-header { background: #f8f9fa; border-bottom: 1px solid #dee2e6; }
.home-html-box { background: #fff; border: 1px solid #e9ecef; border-radius: .8rem; padding: 1.25rem; line-height: 1.9; color: #333; }
.home-html-box img { max-width: 100%; height: auto; }
[data-theme="dark"] .home-box-row .card-header { background: #1f2937; border-color: #374151; }
[data-theme="dark"] .home-html-box { background: #111827; border-color: #374151; color: #d1d5db; }

/* ---- Fatwa cards (homepage + fatwas page) ---- */
.fatwa-card { background: #fff; border: 1px solid #e9ecef; border-radius: 1rem; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.fatwa-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.08); transform: translateY(-3px); }
.fatwa-card-body { padding: 1.1rem 1.1rem .6rem; }
.fatwa-card-title { font-size: 1.05rem; font-weight: 700; margin: .55rem 0 .5rem; line-height: 1.6; }
.fatwa-card-title a { color: #1e3a5f; text-decoration: none; }
.fatwa-card-title a:hover { color: #0e7490; }
.fatwa-card-question { color: #5b6472; font-size: .93rem; line-height: 1.8; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fatwa-card-footer { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1.1rem .9rem; border-top: 1px dashed #e2e8f0; }
[data-theme="dark"] .fatwa-card { background: #111827; border-color: #374151; }
[data-theme="dark"] .fatwa-card-title a { color: #e5e7eb; }
[data-theme="dark"] .fatwa-card-title a:hover { color: #7dd3fc; }
[data-theme="dark"] .fatwa-card-question { color: #9ca3af; }
[data-theme="dark"] .fatwa-card-footer { border-color: #374151; }

/* ---- Category cards rank (homepage) ---- */
.cat-card-icon { position: relative; }
.cat-rank { position: absolute; top: -4px; inset-inline-start: -4px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; background: #0e7490; color: #fff; font-size: .72rem; font-weight: 700; border-radius: 50%; }
[data-theme="dark"] .cat-rank { background: #155e75; }

/* ---- Article prev/next navigation ---- */
.post-prevnext .prevnext-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: var(--color-text);
    transition: all 0.2s;
    height: 100%;
}
.post-prevnext .prevnext-card:hover {
    border-color: var(--color-primary);
    background: #f8fafc;
    transform: translateY(-2px);
}
.post-prevnext .prevnext-card.disabled {
    opacity: 0.5;
    cursor: default;
}
.post-prevnext .prevnext-arrow {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}
.post-prevnext .prevnext-title {
    font-size: 0.95rem;
    line-height: 1.6;
}
[data-theme="dark"] .post-prevnext .prevnext-card {
    background: #1f2937;
    border-color: #374151;
}
[data-theme="dark"] .post-prevnext .prevnext-arrow {
    color: #7dd3fc;
}

/* ---- Student (طالب علم) tools ---- */
.student-tools { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .65rem; padding: 1rem 1.1rem; }
[data-theme="dark"] .student-tools { background: #1f2937; border-color: #374151; }
.student-tools-title { font-size: 1rem; font-weight: 700; margin-bottom: .8rem; color: #0e7490; }
[data-theme="dark"] .student-tools-title { color: #7dd3fc; }
.student-inline-form { display: inline-block; }
.resume-reading-bar { margin-bottom: .5rem; }
.notification-badge { position: relative; top: -6px; inset-inline-end: -2px; font-size: .62rem; }
.notif-pulse { animation: notifPulse .6s ease-in-out 2; }
@keyframes notifPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.student-avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,#0e7490,#155e75); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.student-welcome { background: linear-gradient(135deg,#0e7490,#14b8a6); color: #fff; }
.student-welcome .text-muted { color: #e2e8f0 !important; }
.stat-card { background: #fff; border: 1px solid #e2e8f0; }
.stat-number { font-size: 1.6rem; font-weight: 800; color: #0e7490; }
.stat-label { font-size: .82rem; }
[data-theme="dark"] .stat-card { background: #111827; border-color: #374151; }
[data-theme="dark"] .stat-number { color: #7dd3fc; }
.question-thread, .note-item, .bookmark-item { background: #fff; }
[data-theme="dark"] .question-thread, [data-theme="dark"] .note-item, [data-theme="dark"] .bookmark-item { background: #111827; }

/* =============================================================
   Mobile immersive reading mode — posts/show only.
   Body gets .reader-mode (from @section('body_class')).
   A .reader-ui class is toggled on/off by JS on tap (auto-hidden).
   ============================================================= */
/* ---- Alternative font styles for the article text (naskh / book) ---- */
#postContent.style-naskh,
#postContent.style-naskh p, #postContent.style-naskh div, #postContent.style-naskh li,
#postContent.style-naskh blockquote, #postContent.style-naskh span, #postContent.style-naskh a,
#postContent.style-naskh h1, #postContent.style-naskh h2, #postContent.style-naskh h3,
#postContent.style-naskh h4, #postContent.style-naskh h5, #postContent.style-naskh h6 {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif !important;
}
#postContent.style-book,
#postContent.style-book p, #postContent.style-book div, #postContent.style-book li,
#postContent.style-book blockquote, #postContent.style-book span, #postContent.style-book a,
#postContent.style-book h1, #postContent.style-book h2, #postContent.style-book h3,
#postContent.style-book h4, #postContent.style-book h5, #postContent.style-book h6 {
    font-family: 'Scheherazade New', 'Amiri', serif !important;
}
#postContent.style-modern,
#postContent.style-modern p, #postContent.style-modern div, #postContent.style-modern li,
#postContent.style-modern blockquote, #postContent.style-modern span, #postContent.style-modern a,
#postContent.style-modern h1, #postContent.style-modern h2, #postContent.style-modern h3,
#postContent.style-modern h4, #postContent.style-modern h5, #postContent.style-modern h6 {
    font-family: 'Cairo', 'Segoe UI', 'Tahoma', sans-serif !important;
}
.font-style-btn.active { border-color: var(--color-primary) !important; color: var(--color-primary-dark) !important; background: rgba(14, 116, 144, .08) !important; }
body.fonts-forced .font-style-btn,
body.fonts-forced .rfs-btn { opacity: .5; cursor: not-allowed; }
body.fonts-forced .font-style-btn.active,
body.fonts-forced .rfs-btn.active { opacity: 1; }
.font-force-hint { display: none; }
body.fonts-forced .font-force-hint { display: inline; color: var(--color-muted, #9ca3af); }
.reader-style-pop .font-force-hint { display: none; }
body.fonts-forced .reader-style-pop .font-force-hint { display: block; margin-top: .5rem; color: var(--color-muted, #9ca3af); }

/* ---- Quote-copy button shown when the reader selects text ---- */
.quote-float-btn {
    position: fixed;
    z-index: 1405;
    display: none;
    border: 0;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    padding: 8px 14px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .22);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .quote-float-btn { background: #0e7490; }

/* Quote action cluster (copy quote / share passage / quote image) */
.quote-actions {
    position: fixed;
    z-index: 1405;
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    max-width: 240px;
    min-width: 150px;
    background: rgba(255, 253, 231, .97);
    border: 1px solid rgba(46, 79, 35, .28);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
[data-theme="dark"] .quote-actions {
    background: rgba(28, 36, 25, .97);
    border-color: rgba(108, 122, 87, .45);
}
.quote-actions .quote-float-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    white-space: nowrap;
    background: var(--color-primary);
}
.quote-actions .quote-float-btn:hover { background: var(--color-primary-dark); }

/* Passage deep-link highlight (#q=...) */
#postContent mark.clip-focus {
    background: #ffd54f;
    color: inherit;
    padding: 0 2px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    scroll-margin-top: 110px;
    animation: clipFlash 3s ease 1 forwards;
}
[data-theme="dark"] #postContent mark.clip-focus { background: #7a5f1a; color: #fff; }
@keyframes clipFlash {
    0%   { background: #ffd54f; }
    45%  { background: #ffd54f; }
    100% { background: transparent; }
}

/* ---- Guest "continue reading" bar (localStorage) ---- */
.guest-resume-bar {
    margin-top: 14px;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
[data-theme="dark"] .guest-resume-bar { background: #2a2416; border-color: #6b4c24; }
.guest-resume-bar .guest-resume-link {
    flex: 1 1 auto;
    background: #f59e0b;
    border: 0;
    color: #fff;
    font-weight: 700;
}
.guest-resume-bar .guest-resume-close {
    border: 0;
    background: transparent;
    color: #b45309;
    font-size: 1.2rem;
    line-height: 1;
    padding: 2px 8px;
    cursor: pointer;
}

/* Hidden everywhere by default; only surfaced on phones below. */
.reader-toolbar, .reader-size-pop, .reader-style-pop, .reader-color-pop, .reader-hint, .reader-progress, .reader-tools-pop, .reader-share-pop {
    display: none;
}
@media (max-width: 576px) {
    body.reader-mode { background: #fff; }
    [data-theme="dark"] body.reader-mode { background: #131a12; }

    /* Hide everything but the article by default (immersive) */
    body.reader-mode .topbar,
    body.reader-mode .site-footer,
    body.reader-mode .back-to-top,
    body.reader-mode .whatsapp-float,
    body.reader-mode .main-navbar,
    body.reader-mode .sidebar,
    body.reader-mode .breadcrumb,
    body.reader-mode .student-tools,
    body.reader-mode .single-post-header,
    body.reader-mode .post-font-controls {
        display: none !important;
    }

    /* The article is the only visible thing: strip chrome */
    body.reader-mode .site-main {
        padding-top: 0;
    }
    body.reader-mode .site-main > .container {
        padding: 4px 18px 24px !important;
        max-width: 100%;
    }
    body.reader-mode .single-post {
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 2px 0 0;
    }
    body.reader-mode .single-post-content {
        display: block !important;
        margin-top: 0;
        font-size: 1.15rem;
        line-height: 2;
        color: #20201c;
    }
    [data-theme="dark"] body.reader-mode .single-post-content { color: #e8eadf; }

    body.reader-mode .post-tags,
    body.reader-mode .post-prevnext,
    body.reader-mode .share-box {
        display: none !important;
    }

    /* ---- When the reader UI is shown (tap toggles .reader-ui) ---- */
    body.reader-mode.reader-ui .main-navbar {
        display: block !important;
    }

    /* Floating bottom toolbar for the reading mode — hidden unless .reader-ui */
    body.reader-mode.reader-ui .reader-toolbar {
        display: flex;
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 1500;
        align-items: center;
        justify-content: space-evenly;
        gap: 2px;
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    }
    body.reader-mode .reader-toolbar .reader-tool {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        border: 0;
        background: transparent;
        color: var(--color-text);
        font-size: .82rem;
        font-weight: 600;
        border-radius: 10px;
        padding: 4px 6px;
        -webkit-tap-highlight-color: transparent;
    }
    body.reader-mode .reader-tool i { font-size: 1.2rem; }
    body.reader-mode .reader-tool:active { background: rgb(0 0 0 / .07); }
    [data-theme="dark"] body.reader-mode .reader-tool:active { background: rgb(255 255 255 / .1); }

    body.reader-mode .reader-toolbar .reader-toolbar-divider {
        width: 1px;
        height: 24px;
        background: var(--color-border);
        flex: 0 0 1px;
    }

    /* Font-size / font-style / reading-color popups for the reading mode */
    body.reader-mode .reader-size-pop,
    body.reader-mode .reader-style-pop,
    body.reader-mode .reader-color-pop {
        position: fixed;
        bottom: 64px;
        inset-inline: 12px;
        z-index: 1501;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,.14);
    }
    body.reader-mode .reader-size-pop .rfp-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    body.reader-mode .reader-size-pop button,
    body.reader-mode .reader-style-pop button {
        min-width: 44px;
        height: 40px;
        border-radius: 10px;
        border: 1px solid var(--color-btn);
        background: var(--color-btn);
        color: var(--color-btn-text);
        font-weight: 700;
    }
    body.reader-mode .reader-size-pop button:active,
    body.reader-mode .reader-style-pop button:active {
        background: var(--color-btn-dark);
        border-color: var(--color-btn-dark);
    }
    body.reader-mode .reader-size-pop .rfp-reset {
        color: var(--color-btn-text) !important;
        background: var(--color-btn-dark);
        border-color: var(--color-btn-dark) !important;
    }

    /* Reading-color palette (5 comfortable colors, article text only) */
    body.reader-mode .reader-color-pop .rcp-title {
        font-weight: 700;
        font-size: .9rem;
        margin-bottom: 12px;
        color: var(--color-heading);
    }
    body.reader-mode .reader-color-pop .rcp-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    body.reader-mode .reader-color-pop .rcp-swatch {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 52px;
        border: 1px solid var(--color-btn);
        border-radius: 10px;
        background: var(--color-btn);
        color: var(--color-btn-text);
        font-size: .7rem;
        font-weight: 700;
        padding: 4px 2px;
    }
    body.reader-mode .reader-color-pop .rcp-swatch:active {
        background: var(--color-btn-dark);
        border-color: var(--color-btn-dark);
    }
    body.reader-mode .reader-color-pop .rcp-swatch i { font-size: .9rem; }
    body.reader-mode .reader-color-pop .rcp-swatch.is-active {
        border-color: var(--color-btn-dark);
        color: var(--color-btn-text);
        box-shadow: 0 0 0 2px var(--color-btn-dark);
    }
    body.reader-mode .reader-color-pop .rcp-swatch[data-color="sepia"] i { color: #8a6d3b; }
    body.reader-mode .reader-color-pop .rcp-swatch[data-color="soft-green"] i { color: #3a7d44; }
    body.reader-mode .reader-color-pop .rcp-swatch[data-color="soft-blue"] i { color: #2b6cb0; }
    body.reader-mode .reader-color-pop .rcp-swatch[data-color="night"] i { color: #42526b; }
    body.reader-mode .reader-color-pop .rcp-note {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed var(--color-border);
        line-height: 1.6;
    }

    /* Comfortable reading colors — applied to the article text ONLY,
       never toggles the site day/night theme. */
    body.reader-mode .single-post-content.reader-text-sepia {
        background: #f4ead6 !important;
        color: #4a3b28 !important;
    }
    body.reader-mode .single-post-content.reader-text-soft-green {
        background: #e7f1df !important;
        color: #24381f !important;
    }
    body.reader-mode .single-post-content.reader-text-soft-blue {
        background: #e6f0fa !important;
        color: #1d3557 !important;
    }
    body.reader-mode .single-post-content.reader-text-night {
        background: #161b26 !important;
        color: #cdd4de !important;
    }
    body.reader-mode .single-post-content.reader-text-sepia p,
    body.reader-mode .single-post-content.reader-text-sepia div,
    body.reader-mode .single-post-content.reader-text-sepia li,
    body.reader-mode .single-post-content.reader-text-sepia blockquote,
    body.reader-mode .single-post-content.reader-text-sepia span,
    body.reader-mode .single-post-content.reader-text-sepia a,
    body.reader-mode .single-post-content.reader-text-soft-green p,
    body.reader-mode .single-post-content.reader-text-soft-green div,
    body.reader-mode .single-post-content.reader-text-soft-green li,
    body.reader-mode .single-post-content.reader-text-soft-green blockquote,
    body.reader-mode .single-post-content.reader-text-soft-green span,
    body.reader-mode .single-post-content.reader-text-soft-green a,
    body.reader-mode .single-post-content.reader-text-soft-blue p,
    body.reader-mode .single-post-content.reader-text-soft-blue div,
    body.reader-mode .single-post-content.reader-text-soft-blue li,
    body.reader-mode .single-post-content.reader-text-soft-blue blockquote,
    body.reader-mode .single-post-content.reader-text-soft-blue span,
    body.reader-mode .single-post-content.reader-text-soft-blue a,
    body.reader-mode .single-post-content.reader-text-night p,
    body.reader-mode .single-post-content.reader-text-night div,
    body.reader-mode .single-post-content.reader-text-night li,
    body.reader-mode .single-post-content.reader-text-night blockquote,
    body.reader-mode .single-post-content.reader-text-night span,
    body.reader-mode .single-post-content.reader-text-night a {
        background: transparent !important;
        color: inherit;
    }

    /* Share popup for the reading mode (native share fallback) */
    body.reader-mode .reader-share-pop {
        position: fixed;
        bottom: 64px;
        inset-inline: 12px;
        z-index: 1501;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,.14);
    }
    body.reader-mode .reader-share-pop .rsp-title {
        font-weight: 700;
        font-size: .9rem;
        margin-bottom: 12px;
        color: var(--color-heading);
    }
    body.reader-mode .reader-share-pop .rsp-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    body.reader-mode .reader-share-pop .rsp-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
        border: 1px solid var(--color-btn);
        border-radius: 10px;
        background: var(--color-btn);
        color: var(--color-btn-text) !important;
        font-weight: 700;
        font-size: .85rem;
        text-decoration: none;
        cursor: pointer;
    }
    body.reader-mode .reader-share-pop .rsp-btn:active {
        background: var(--color-btn-dark);
        border-color: var(--color-btn-dark);
    }

    /* "أدوات المتابعة" popup for the reading mode (personal follow-up tools) */
    body.reader-mode .reader-tools-pop {
        position: fixed;
        bottom: 64px;
        inset-inline: 12px;
        z-index: 1501;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
    }
    body.reader-mode .reader-tools-pop .rtp-title {
        font-weight: 700;
        font-size: .9rem;
        margin-bottom: 0;
        color: var(--color-heading);
    }
    body.reader-mode .reader-tools-pop .rtp-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 36px;
        padding: 4px 12px;
        border: 1px solid var(--color-btn);
        border-radius: 10px;
        background: transparent;
        color: var(--color-btn);
        font-weight: 600;
        font-size: .85rem;
        line-height: 1;
        cursor: pointer;
        margin-inline-start: auto;
        transition: background .2s ease, color .2s ease, border-color .2s ease;
    }
    body.reader-mode .reader-tools-pop .rtp-close:hover,
    body.reader-mode .reader-tools-pop .rtp-close:focus-visible {
        background: var(--color-btn);
        color: var(--color-btn-text);
        border-color: var(--color-btn);
    }
    [data-theme="dark"] body.reader-mode .reader-tools-pop .rtp-close {
        color: #a8c69f;
        border-color: #3c4930;
    }
    [data-theme="dark"] body.reader-mode .reader-tools-pop .rtp-close:hover,
    [data-theme="dark"] body.reader-mode .reader-tools-pop .rtp-close:focus-visible {
        background: #3c4930;
        color: #f7faf5;
    }
    body.reader-mode .reader-tools-pop .rtp-form { display: block; margin-bottom: 8px; }
    body.reader-mode .reader-tools-pop .rtp-form:last-child { margin-bottom: 0; }
    body.reader-mode .reader-tools-pop .rtp-btn {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        border: 1px solid var(--color-btn);
        border-radius: 12px;
        background: var(--color-btn);
        color: var(--color-btn-text);
        font-weight: 700;
        font-size: .9rem;
        text-decoration: none;
        cursor: pointer;
    }
    body.reader-mode .reader-tools-pop .rtp-btn:active {
        transform: scale(.97);
        background: var(--color-btn-dark);
        border-color: var(--color-btn-dark);
    }
    body.reader-mode .reader-tools-pop .rtp-btn.is-done {
        background: var(--color-btn-dark);
        border-color: var(--color-btn-dark);
        color: var(--color-btn-text);
    }
    body.reader-mode .reader-tools-pop .rtp-note textarea {
        width: 100%;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        padding: 8px;
        font-size: .85rem;
        resize: vertical;
        margin-bottom: 6px;
    }
    [data-theme="dark"] body.reader-mode .reader-tools-pop .rtp-note textarea { background: #141b12; border-color: #3c4930; color: #e8eadf; }

    /* Reading progress bar (fraction read) at the very top */
    body.reader-mode .reader-progress {
        display: block;
        position: fixed;
        top: 0;
        inset-inline: 0;
        height: 3px;
        z-index: 1499;
        background: rgba(14, 116, 144, .12);
        pointer-events: none;
    }
    body.reader-mode .reader-progress > span {
        display: block;
        height: 100%;
        width: 0;
        background: var(--color-primary);
        transition: width .08s linear;
    }

    /* Font-style row inside the reading-mode font-style popup */
    body.reader-mode .reader-style-pop .rfs-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    body.reader-mode .reader-style-pop .rfs-row .rfs-btn {
        min-height: 36px;
        height: auto;
        font-size: .76rem;
        flex: 1 1 0;
        padding: 4px 6px;
    }
    body.reader-mode .reader-style-pop .rfs-btn.active {
        border-color: var(--color-btn-dark) !important;
        color: var(--color-btn-text) !important;
        background: var(--color-btn-dark) !important;
    }

    /* Guest "continue reading" pill floats at the top on phones */
    body.reader-mode .guest-resume-bar {
        position: fixed;
        top: 12px;
        inset-inline: 14px;
        z-index: 1400;
        margin: 0;
        padding: 8px 10px;
    }
    body.reader-mode.reader-ui .guest-resume-bar { display: none; }

    /* A hint chip that fades in once when the reader mode starts */
    body.reader-mode .reader-hint {
        position: fixed;
        bottom: 18px;
        inset-inline: 0;
        margin: 0 auto;
        width: fit-content;
        z-index: 1490;
        background: rgba(15, 23, 42, .82);
        color: #fff;
        font-size: .8rem;
        padding: 8px 16px;
        border-radius: 999px;
        pointer-events: none;
        opacity: 0;
        transition: opacity .4s ease;
    }
    body.reader-mode .reader-hint.show { display: block; opacity: 1; }
}

/* Read-mode toast notifications (site-wide helper visible in reading mode) */
.reader-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    z-index: 3000;
    max-width: min(92vw, 420px);
    background: #14532d;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    transition: opacity .25s ease, transform .25s ease;
}
.reader-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}
.reader-toast.err {
    background: #7f1d1d;
}
[data-theme="dark"] .reader-toast {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
}
@media (max-width: 576px) {
    body.reader-mode .reader-toast { bottom: 78px; }
}

/* Reading statistics + quick options inside the "أدوات المتابعة" popup */
body.reader-mode .reader-tools-pop .rtp-stats {
    margin: 12px 0;
    padding: 10px 12px;
    background: rgba(14, 116, 144, .08);
    border: 1px dashed #9ccd5e;
    border-radius: 10px;
    color: var(--color-text);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.7;
}
[data-theme="dark"] body.reader-mode .reader-tools-pop .rtp-stats { background: rgba(156, 205, 94, .08); border-color: #4a5a39; }
body.reader-mode .reader-tools-pop .rtp-options { margin-top: 4px; }
body.reader-mode .reader-tools-pop .rtp-opt-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-muted);
    margin: 8px 0 6px;
}
body.reader-mode .reader-tools-pop .rtp-options .rtp-btn { margin-bottom: 8px; }
body.reader-mode .reader-tools-pop .rtp-options .rtp-btn:last-child { margin-bottom: 0; }
body.reader-mode .reader-tools-pop .rtp-btn[data-on="1"] {
    background: var(--color-btn-dark);
    border-color: var(--color-btn-dark);
    color: var(--color-btn-text);
}

/* Reading guide line: gentle highlight of the current block */
.single-post-content .rl-active {
    background: rgba(255, 213, 79, .16);
    border-radius: 6px;
    box-shadow: 0 0 0 6px rgba(255, 213, 79, .08);
}
[data-theme="dark"] .single-post-content .rl-active {
    background: rgba(255, 213, 79, .14);
    box-shadow: 0 0 0 6px rgba(255, 213, 79, .05);
}

/* Dark mode: soften article images so they don't glare at night */
[data-theme="dark"] .single-post-content img {
    filter: brightness(.88) contrast(1.04);
}

/* Continue-reading card for visitors on the homepage */
.continue-reading-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 5px solid #0e7490;
    border-radius: 12px;
    padding: 16px 18px;
}
.continue-reading-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
}
.cr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Visitor series-completion tracker on audio category pages */
.series-track-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 16px 18px;
}
.lesson-done-btn.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}
.lesson-done-btn.active i { color: inherit; }

/* ===== Themed Bootstrap primary buttons =====
   Uses --color-btn (set from admin settings, defaulting to the site green)
   so every .btn-primary / .btn-outline-primary follows the theme in both
   light and dark mode instead of Bootstrap's default blue. */
.btn-primary,
.btn-primary:focus {
    --bs-btn-bg: var(--color-btn);
    --bs-btn-border-color: var(--color-btn);
    --bs-btn-hover-bg: var(--color-btn-dark);
    --bs-btn-hover-border-color: var(--color-btn-dark);
    --bs-btn-active-bg: var(--color-btn-dark);
    --bs-btn-active-border-color: var(--color-btn-dark);
    --bs-btn-disabled-bg: var(--color-btn-light);
    --bs-btn-disabled-border-color: var(--color-btn-light);
    --bs-btn-color: var(--color-btn-text);
    --bs-btn-hover-color: var(--color-btn-text);
    --bs-btn-active-color: var(--color-btn-text);
    --bs-btn-disabled-color: var(--color-btn-text);
}

.btn-outline-primary,
.btn-outline-primary:focus {
    --bs-btn-color: var(--color-btn-dark);
    --bs-btn-border-color: var(--color-btn);
    --bs-btn-hover-bg: var(--color-btn);
    --bs-btn-hover-border-color: var(--color-btn);
    --bs-btn-hover-color: var(--color-btn-text);
    --bs-btn-active-bg: var(--color-btn-dark);
    --bs-btn-active-border-color: var(--color-btn-dark);
    --bs-btn-active-color: var(--color-btn-text);
    --bs-btn-disabled-color: var(--color-btn);
    --bs-btn-disabled-border-color: var(--color-btn);
}

.btn-primary:focus-visible,
.btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--color-btn) 40%, transparent);
}

.btn-primary .spinner-border,
.btn-outline-primary .spinner-border {
    color: var(--color-btn-text);
}

.btn-link {
    color: var(--color-btn-dark);
}

/* Pagination active page (light + dark) */
.pagination .page-item.active .page-link {
    background-color: var(--color-btn);
    border-color: var(--color-btn);
    color: #fff;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--color-btn);
    border-color: var(--color-btn);
    color: var(--color-btn-text);
}

/* Android/iOS form focus + checkboxes stay coherent */
.form-check-input:checked,
.form-switch .form-check-input:focus {
    background-color: var(--color-btn);
    border-color: var(--color-btn);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--color-btn-light);
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--color-btn) 25%, transparent);
}

.accordion-button:not(.collapsed) {
    background-color: color-mix(in srgb, var(--color-btn-light) 45%, transparent);
    color: var(--color-btn-dark);
}
.accordion-button:not(.collapsed)::after {
    filter: hue-rotate(0deg);
}

/* ===== Dark-mode: text on primary-green surfaces must be dark =====
   In dark mode --color-primary is a light green (#9ccd5e) so white text
   becomes invisible.  Override the text colour of every element that has a
   green/primary background + hardcoded white text.  This single block
   replaces the need to hunt dozens of scattered `color:#fff` lines. */
[data-theme="dark"] .topbar,
[data-theme="dark"] .topbar a,
[data-theme="dark"] .topbar a:hover,
[data-theme="dark"] .hero-section,
[data-theme="dark"] .hero-section h1,
[data-theme="dark"] .hero-section .hero-intro,
[data-theme="dark"] .hero-cell,
[data-theme="dark"] .hero-cell:hover,
[data-theme="dark"] .tag-badge:hover,
[data-theme="dark"] .btn-read-more:hover,
[data-theme="dark"] .btn-listen,
[data-theme="dark"] .btn-listen:hover,
[data-theme="dark"] .btn-download:hover,
[data-theme="dark"] .back-to-top,
[data-theme="dark"] .back-to-top:hover,
[data-theme="dark"] .mv-rank,
[data-theme="dark"] .book-cover-art,
[data-theme="dark"] .btn-book-download,
[data-theme="dark"] .btn-book-download:hover,
[data-theme="dark"] .hl-float-btn {
    color: var(--on-primary) !important;
}
[data-theme="dark"] .back-to-top:hover {
    background-color: var(--color-btn-dark) !important;
}
/* .btn-primary text stays readable in dark even when the generic "dark a"
   rule (0,1,1) would otherwise recolor anchor tags to light green. */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary:active,
[data-theme="dark"] .btn-primary:disabled,
[data-theme="dark"] a.btn-primary,
[data-theme="dark"] a.btn-primary:hover,
[data-theme="dark"] a.btn-primary:focus,
[data-theme="dark"] a.btn-primary:active {
    color: var(--color-btn-text) !important;
    --bs-btn-color: var(--color-btn-text);
    --bs-btn-hover-color: var(--color-btn-text);
    --bs-btn-active-color: var(--color-btn-text);
    --bs-btn-disabled-color: var(--color-btn-text);
}
[data-theme="dark"] .tag-badge:hover {
    background-color: var(--color-btn) !important;
}
[data-theme="dark"] .btn-listen,
[data-theme="dark"] .btn-listen:hover,
[data-theme="dark"] .btn-book-download,
[data-theme="dark"] .btn-book-download:hover {
    background-color: var(--color-btn) !important;
}
[data-theme="dark"] .btn-read-more:hover {
    background-color: var(--color-btn) !important;
}
[data-theme="dark"] .btn-download:hover {
    background-color: var(--color-btn) !important;
}
[data-theme="dark"] .topbar {
    background: linear-gradient(135deg, var(--color-btn-dark), var(--color-btn)) !important;
}
[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, var(--color-btn-dark) 0%, var(--color-btn) 60%, var(--color-btn-light) 100%) !important;
}
[data-theme="dark"] .mv-rank {
    background: linear-gradient(135deg, var(--color-btn), var(--color-btn-dark)) !important;
}
[data-theme="dark"] .book-cover-art {
    background: linear-gradient(135deg, var(--color-btn), var(--color-btn-light)) !important;
}
[data-theme="dark"] .hl-float-btn {
    background: #155e75 !important;
}

/* ===== Dark-mode continue-reading card (crTitle & friends) =====
   The card previously had no dark styles: it stayed white with a white
   heading, so the title was invisible. */
[data-theme="dark"] .continue-reading-card {
    background: var(--color-surface);
    border-color: var(--color-border);
    border-left-color: #155e75;
}
[data-theme="dark"] .continue-reading-card h4 {
    color: var(--color-heading);
}
[data-theme="dark"] .continue-reading-card .text-muted {
    color: var(--color-muted) !important;
}
[data-theme="dark"] .series-track-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}

/* ===== Dark-mode footer =====
   The footer keeps its own fixed dark-green banner + light text in dark
   mode.  It must NOT follow the admin button colours (--color-btn* /
   --on-primary): those are user-tunable and can go dark-on-dark.  The
   light-mode footer already used the dark shade of the primary + white
   text; here the same design is kept for the dark theme. */
[data-theme="dark"] .site-footer {
    background: #182110 !important;
    color: #eef0ea !important;
}
[data-theme="dark"] .site-footer h5 {
    color: #bcdc8f !important;
}
[data-theme="dark"] .site-footer p {
    color: #d3dcc9 !important;
    opacity: 1;
}
[data-theme="dark"] .site-footer .footer-links a {
    color: #e8ece4 !important;
}
[data-theme="dark"] .site-footer .footer-links a:hover {
    color: #bcdc8f !important;
}
[data-theme="dark"] .site-footer .footer-social a {
    background: rgba(255,255,255,0.08);
    color: #ffffff !important;
}
[data-theme="dark"] .site-footer .footer-social a:hover {
    background: var(--color-btn);
    color: var(--color-btn-text) !important;
    transform: translateY(-3px);
}
[data-theme="dark"] .site-footer .footer-bottom {
    background: rgba(0,0,0,0.35);
    color: #cfd8c8;
}

/* ===== Article image lightbox (تكبير صورة داخل المقال) ===== */
.lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    touch-action: manipulation;
    cursor: zoom-out;
}
.lb-overlay.open { opacity: 1; visibility: visible; }
.lb-stage {
    max-width: 92vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-stage img {
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(.96);
    transition: transform .25s ease;
    background: #fff;
    -webkit-user-drag: none;
    user-select: none;
}
.lb-overlay.open .lb-stage img { transform: scale(1); }
.lb-close, .lb-prev, .lb-next {
    position: fixed;
    z-index: 2001;
    background: rgba(255,255,255,0.14);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.3); }
.lb-close { top: 16px; inset-inline-start: 16px; }
.lb-prev { top: 50%; inset-inline-start: 14px; transform: translateY(-50%); }
.lb-next { top: 50%; inset-inline-end: 14px; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.08); }
.lb-next:hover { transform: translateY(-50%) scale(1.08); }
.lb-caption {
    position: fixed;
    bottom: 56px;
    inset-inline: 0;
    text-align: center;
    color: #e2e8f0;
    font-size: 15px;
    padding: 0 60px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    max-width: 80vw;
    margin-inline: auto;
    overflow-wrap: break-word;
}
.lb-counter {
    position: fixed;
    bottom: 18px;
    inset-inline: 0;
    text-align: center;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    letter-spacing: .5px;
}
body.lb-lock { overflow: hidden; }
@media (max-width: 576px) {
    .lb-prev, .lb-next { width: 38px; height: 38px; font-size: 16px; }
    .lb-close { width: 38px; height: 38px; font-size: 18px; top: 12px; inset-inline-start: 12px; }
    .lb-caption { bottom: 48px; font-size: 13px; padding: 0 46px; }
    .lb-counter { font-size: 12px; }
}

/* Same-series related articles block shown at the end of the article on mobile */
.post-series-related {
    display: none;
}
@media (max-width: 576px) {
    .post-series-related {
        display: block;
        margin-top: 28px;
        clear: both;
    }
    .post-series-related .psr-divider {
        border-top: 2px solid var(--color-primary);
        border-radius: 99px;
        opacity: .35;
        margin-bottom: 18px;
    }
    .post-series-related .psr-title {
        font-size: .95rem;
        font-weight: 800;
        color: var(--color-heading);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .post-series-related .psr-title i { color: var(--color-primary); }
    .post-series-related .psr-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .post-series-related .psr-list li + li { margin-top: 10px; }
    .post-series-related .psr-list a {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        padding: 12px 14px;
        color: var(--color-text);
        text-decoration: none;
        transition: border-color .2s ease, box-shadow .2s ease;
        box-shadow: 0 2px 6px rgba(0,0,0,.04);
    }
    .post-series-related .psr-list a:active {
        border-color: var(--color-primary);
        box-shadow: 0 4px 14px rgba(14,116,144,.16);
    }
    .post-series-related .psr-num {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(14,116,144,.12);
        color: var(--color-primary-dark);
        font-size: .78rem;
        font-weight: 800;
    }
    .post-series-related .psr-text {
        flex: 1 1 auto;
        font-weight: 600;
        font-size: .8rem;
        line-height: 1.55;
    }
    .post-series-related .psr-arrow {
        flex: 0 0 auto;
        color: var(--color-muted);
        font-size: .85rem;
    }
    [data-theme="dark"] .post-series-related .psr-list a {
        background: rgba(255,255,255,.02);
        box-shadow: none;
    }
}


/* ==================================================================
   Report-error modal (custom danger)
   ================================================================== */
#reportErrorModal .btn-danger { background: #dc3545; border-color: #dc3545; }
#reportErrorModal .btn-danger:hover { background: #bb2d3b; border-color: #bb2d3b; }

/* ==================================================================
   Offline saved-articles page (public /my-saved)
   ================================================================== */
.saved-articles-list { list-style: none; padding: 0; margin: 0; }
.saved-articles-list li {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,.08);
}
.saved-articles-list li:last-child { border-bottom: none; }
.saved-articles-list a { flex: 1 1 auto; font-weight: 600; text-decoration: none; color: var(--color-fg, #222); }
.saved-articles-list a:hover { color: var(--color-primary, #0e7490); }
.saved-articles-list .saved-date { font-size: .75rem; color: var(--color-muted); }
.saved-articles-list .saved-del {
    border: none; background: transparent; color: var(--color-muted); cursor: pointer;
    font-size: .9rem; padding: 4px 6px; border-radius: 4px;
}
.saved-articles-list .saved-del:hover { color: #dc3545; background: rgba(220,53,69,.08); }
[data-theme="dark"] .saved-articles-list li { border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .saved-articles-list a { color: #e2e8f0; }

