/*
Theme Name: ParallelQuran
Theme URI: https://parallelquran.com
Author: ParallelQuran
Author URI: https://parallelquran.com
Description: A comprehensive Islamic scripture study platform for exploring the Quran word-by-word, translation-by-translation, with hadith collections, isnad analysis, narrator research tools, and tafsir commentary.
Version: 2.66.75
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: parallelquran
Tags: islamic, quran, hadith, tafsir, rtl-language-support, custom-post-type
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Primary Palette */
    --pq-green-dark: #1B5E20;
    --pq-green: #2E7D32;
    --pq-green-light: #4CAF50;
    --pq-green-pale: #E8F5E9;
    --pq-dark-green: #0D3311;

    /* Gold / Accent */
    --pq-gold-dark: #C5A55A;
    --pq-gold: #C49A2F;
    --pq-gold-light: #F0E6C0;
    --pq-light-gold: #FFF8E1;

    /* Navy */
    --pq-navy-dark: #1A237E;
    --pq-navy: #283593;
    --pq-navy-light: #3F51B5;

    /* Neutrals & Backgrounds */
    --pq-cream: #FAF7F0;
    --pq-cream-warm: #F5F0E8;
    --pq-white: #FFFFFF;
    --pq-gray-50: #FAFAFA;
    --pq-gray-100: #F5F5F5;
    --pq-gray-200: #EEEEEE;
    --pq-gray-300: #E0E0E0;
    --pq-gray-400: #BDBDBD;
    --pq-gray-500: #9E9E9E;
    --pq-gray-600: #757575;
    --pq-gray-700: #616161;
    --pq-gray-800: #424242;
    --pq-gray-900: #212121;
    --pq-charcoal: #2D2D2D;
    --pq-divider: #D4D1CA;

    /* Semantic Colors */
    --pq-meccan: #1B5E20;
    --pq-medinan: #283593;
    --pq-sahih: #1B5E20;
    --pq-sunan: #2E7D32;
    --pq-compilation: #C5A55A;
    --pq-shia: #6A1B9A;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 900px;
    --container-wide: 1400px;
    --header-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pq-gray-900);
    background-color: var(--pq-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--pq-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--pq-green-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--pq-gray-900);
    margin-top: 0;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.arabic-text {
    font-family: var(--font-arabic);
    direction: rtl;
    text-align: right;
    line-height: 2;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ==========================================================================
   Islamic Geometric Pattern (CSS-generated)
   ========================================================================== */

.islamic-pattern {
    background-image:
        linear-gradient(30deg, var(--pq-gold-light) 12%, transparent 12.5%, transparent 87%, var(--pq-gold-light) 87.5%, var(--pq-gold-light)),
        linear-gradient(150deg, var(--pq-gold-light) 12%, transparent 12.5%, transparent 87%, var(--pq-gold-light) 87.5%, var(--pq-gold-light)),
        linear-gradient(30deg, var(--pq-gold-light) 12%, transparent 12.5%, transparent 87%, var(--pq-gold-light) 87.5%, var(--pq-gold-light)),
        linear-gradient(150deg, var(--pq-gold-light) 12%, transparent 12.5%, transparent 87%, var(--pq-gold-light) 87.5%, var(--pq-gold-light)),
        linear-gradient(60deg, rgba(240, 230, 192, 0.5) 25%, transparent 25.5%, transparent 75%, rgba(240, 230, 192, 0.5) 75%, rgba(240, 230, 192, 0.5)),
        linear-gradient(60deg, rgba(240, 230, 192, 0.5) 25%, transparent 25.5%, transparent 75%, rgba(240, 230, 192, 0.5) 75%, rgba(240, 230, 192, 0.5));
    background-size: 40px 70px;
    background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
}

.islamic-border-top {
    border-top: 3px solid var(--pq-gold);
    position: relative;
}

.islamic-border-top::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--pq-gold) 0px,
        var(--pq-gold) 8px,
        var(--pq-green) 8px,
        var(--pq-green) 12px
    );
}

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

.site-header {
    background: var(--pq-green-dark);
    color: var(--pq-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.site-branding a {
    color: var(--pq-white);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.site-branding a:hover {
    color: var(--pq-gold);
}

.site-branding .brand-dot {
    color: var(--pq-gold);
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-xs);
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--pq-white);
    background: rgba(255, 255, 255, 0.1);
}

.main-navigation .current-menu-item a {
    border-bottom: 2px solid var(--pq-gold);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--pq-white);
    cursor: pointer;
    padding: var(--space-sm);
    font-size: 1.5rem;
    line-height: 1;
}

.menu-toggle .hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--pq-white);
    position: relative;
    transition: var(--transition-base);
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--pq-white);
    left: 0;
    transition: var(--transition-base);
}

.menu-toggle .hamburger::before { top: -7px; }
.menu-toggle .hamburger::after { top: 7px; }

.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: background var(--transition-fast);
}

.header-search-form:focus-within {
    background: rgba(255, 255, 255, 0.25);
}

.header-search-form input[type="search"] {
    background: none;
    border: none;
    color: var(--pq-white);
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    width: 180px;
    outline: none;
    font-family: var(--font-body);
}

.header-search-form input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.header-search-form button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.header-search-form button:hover {
    color: var(--pq-white);
}

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

.site-footer {
    background: var(--pq-gray-900);
    color: var(--pq-gray-400);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-section h3 {
    color: var(--pq-white);
    font-size: 1rem;
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: var(--space-xs);
}

.footer-section ul a {
    color: var(--pq-gray-400);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-section ul a:hover {
    color: var(--pq-gold);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: var(--space-2xl) auto 0;
    padding: var(--space-lg) var(--space-lg) 0;
    border-top: 1px solid var(--pq-gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

.footer-bottom a {
    color: var(--pq-gray-500);
}

.footer-bottom a:hover {
    color: var(--pq-gold);
}

/* ==========================================================================
   Hero Section (Homepage)
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--pq-green-dark) 0%, var(--pq-navy-dark) 100%);
    color: var(--pq-white);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(30deg, var(--pq-gold) 12%, transparent 12.5%, transparent 87%, var(--pq-gold) 87.5%),
        linear-gradient(150deg, var(--pq-gold) 12%, transparent 12.5%, transparent 87%, var(--pq-gold) 87.5%),
        linear-gradient(30deg, var(--pq-gold) 12%, transparent 12.5%, transparent 87%, var(--pq-gold) 87.5%),
        linear-gradient(150deg, var(--pq-gold) 12%, transparent 12.5%, transparent 87%, var(--pq-gold) 87.5%),
        linear-gradient(60deg, rgba(212, 175, 55, 0.5) 25%, transparent 25.5%, transparent 75%, rgba(212, 175, 55, 0.5) 75%),
        linear-gradient(60deg, rgba(212, 175, 55, 0.5) 25%, transparent 25.5%, transparent 75%, rgba(212, 175, 55, 0.5) 75%);
    background-size: 40px 70px;
    background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero .bismillah {
    font-family: var(--font-arabic);
    font-size: 2rem;
    color: var(--pq-gold);
    margin-bottom: var(--space-lg);
    direction: rtl;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--pq-white);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.hero h1 .brand-dot {
    color: var(--pq-gold);
}

.hero .tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-2xl);
    font-weight: 300;
}

/* Hero Search */
.hero-search {
    max-width: 560px;
    margin: 0 auto var(--space-2xl);
}

.hero-search form {
    display: flex;
    background: var(--pq-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-search input[type="search"] {
    flex: 1;
    border: none;
    padding: var(--space-md) var(--space-lg);
    font-size: 1.0625rem;
    font-family: var(--font-body);
    color: var(--pq-gray-900);
    outline: none;
}

.hero-search input[type="search"]::placeholder {
    color: var(--pq-gray-500);
}

.hero-search button {
    background: var(--pq-green);
    border: none;
    color: var(--pq-white);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background var(--transition-fast);
}

.hero-search button:hover {
    background: var(--pq-green-dark);
}

/* ==========================================================================
   Section Cards (Homepage)
   ========================================================================== */

.section-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    /* v2.66.50: remove top padding (was --space-3xl) — handled by .landing-content padding */
    padding: 0 0 var(--space-3xl);
}

.section-card {
    background: var(--pq-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--pq-gray-200);
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pq-gold);
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.section-card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-lg);
    background: var(--pq-green-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--pq-green);
}

.section-card h3 {
    font-size: 1.375rem;
    margin-bottom: var(--space-sm);
    color: var(--pq-green-dark);
}

.section-card p {
    color: var(--pq-gray-600);
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

.section-card .card-link {
    display: inline-block;
    padding: var(--space-sm) var(--space-xl);
    background: var(--pq-green);
    color: var(--pq-white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background var(--transition-fast);
}

.section-card .card-link:hover {
    background: var(--pq-green-dark);
    color: var(--pq-white);
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    padding: var(--space-xl) 0 var(--space-3xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

/* v2.66.49: clickable stat tiles (anchors) */
a.stat-item {
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    transition: background var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
}
a.stat-item:hover,
a.stat-item:focus {
    background: var(--pq-green-pale);
    transform: translateY(-2px);
}
a.stat-item:hover .stat-number,
a.stat-item:focus .stat-number {
    color: var(--pq-green);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--pq-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Page Headers
   ========================================================================== */

.page-header {
    background: linear-gradient(135deg, var(--pq-green-dark) 0%, var(--pq-navy-dark) 100%);
    color: var(--pq-white);
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(30deg, var(--pq-gold) 12%, transparent 12.5%, transparent 87%, var(--pq-gold) 87.5%),
        linear-gradient(150deg, var(--pq-gold) 12%, transparent 12.5%, transparent 87%, var(--pq-gold) 87.5%);
    background-size: 40px 70px;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--pq-white);
    margin-bottom: var(--space-sm);
    font-size: 2rem;
}

.page-header .page-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
}

.page-header .arabic-title {
    font-family: var(--font-arabic);
    font-size: 1.75rem;
    color: var(--pq-gold);
    direction: ltr;
    text-align: left;
    margin-bottom: var(--space-sm);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: 0.875rem;
    color: var(--pq-gray-600);
}

.breadcrumbs a {
    color: var(--pq-gray-600);
}

.breadcrumbs a:hover {
    color: var(--pq-green);
}

.breadcrumbs .separator {
    margin: 0 var(--space-sm);
    color: var(--pq-gray-400);
}

/* ==========================================================================
   Surah Listing (Quran Page)
   ========================================================================== */

.surah-filters {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--pq-gray-300);
    background: var(--pq-white);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
    color: var(--pq-gray-700);
}

.filter-btn:hover {
    border-color: var(--pq-green);
    color: var(--pq-green);
}

.filter-btn.active {
    background: var(--pq-green);
    color: var(--pq-white);
    border-color: var(--pq-green);
}

.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    padding-bottom: var(--space-3xl);
}

.surah-card {
    display: flex;
    align-items: center;
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--pq-gray-200);
    transition: all var(--transition-fast);
    gap: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.surah-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--pq-green-light);
    transform: translateY(-1px);
    color: inherit;
}

.surah-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.surah-info {
    flex: 1;
    min-width: 0;
}

.surah-name-en {
    font-weight: 600;
    font-size: 1rem;
    color: var(--pq-gray-900);
    line-height: 1.3;
}

.surah-name-transliteration {
    color: var(--pq-gray-500);
    font-size: 0.8125rem;
}

.surah-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8125rem;
    color: var(--pq-gray-500);
    margin-top: 2px;
}

.surah-arabic {
    font-family: var(--font-arabic);
    font-size: 1.375rem;
    color: var(--pq-green-dark);
    direction: rtl;
    flex-shrink: 0;
    line-height: 1.5;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-meccan {
    background: rgba(27, 94, 32, 0.1);
    color: var(--pq-meccan);
}

.badge-medinan {
    background: rgba(40, 53, 147, 0.1);
    color: var(--pq-medinan);
}

.badge-sahih {
    background: rgba(27, 94, 32, 0.15);
    color: var(--pq-sahih);
}

.badge-sunan {
    background: rgba(46, 125, 50, 0.1);
    color: var(--pq-sunan);
}

.badge-compilation {
    background: rgba(197, 165, 90, 0.15);
    color: #8B7340;
}

.badge-specialized {
    background: rgba(63, 81, 181, 0.1);
    color: var(--pq-navy);
}

.badge-muwatta,
.badge-musnad {
    background: rgba(46, 125, 50, 0.08);
    color: var(--pq-sunan);
}

.badge-shia {
    background: rgba(106, 27, 154, 0.1);
    color: var(--pq-shia);
}

.badge-coming-soon {
    background: var(--pq-gray-200);
    color: var(--pq-gray-600);
}

/* ==========================================================================
   Individual Surah Page (Ayah List)
   ========================================================================== */

.surah-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.surah-header-info .verse-count,
.surah-header-info .revelation-type {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
}

.ayah-list {
    padding: var(--space-xl) 0 var(--space-3xl);
}

.ayah-item {
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--pq-gray-200);
    transition: border-color var(--transition-fast);
}

.ayah-item:hover {
    border-color: var(--pq-green-light);
}

.ayah-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ayah-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.ayah-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pq-green);
    background: var(--pq-green-pale);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

.ayah-arabic {
    font-family: var(--font-arabic);
    font-size: 1.75rem;
    line-height: 2.2;
    direction: rtl;
    text-align: right;
    color: var(--pq-gray-900);
    padding: var(--space-md) 0;
}

.ayah-arrow {
    color: var(--pq-gray-400);
    font-size: 1.25rem;
}

/* ==========================================================================
   Individual Verse Page (single-ayah)
   ========================================================================== */

.verse-display {
    background: var(--pq-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin: var(--space-xl) 0;
    border: 1px solid var(--pq-gray-200);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.verse-arabic-main {
    font-family: var(--font-arabic);
    font-size: 2.5rem;
    line-height: 2.4;
    direction: rtl;
    text-align: center;
    color: var(--pq-green-dark);
    padding: var(--space-xl) 0 var(--space-md);
}

.verse-transliteration-inline {
    font-style: italic;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--pq-gray-700);
    text-align: center;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--pq-gray-200);
    margin-bottom: var(--space-md);
}

.verse-reference {
    font-size: 0.9375rem;
    color: var(--pq-gray-600);
}

/* ── Verse Context Box ─────────────────────────────────── */
.pq-context-box {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-lg) 0 var(--space-xl);
}
.pq-context-heading {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 var(--space-xs) 0;
    color: var(--pq-gray-900);
    letter-spacing: 0.02em;
}
.pq-context-surah-label {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--pq-gray-200);
}
.pq-context-verses {
    line-height: 2;
    font-size: 1rem;
}
.pq-context-verse {
    display: block;
    padding: var(--space-sm) 0;
}
.pq-context-verse + .pq-context-verse {
    border-top: 1px dotted var(--pq-gray-200);
}
.pq-context-verse--current {
    background: var(--pq-green-light, #f0faf4);
    margin: var(--space-xs) calc(-1 * var(--space-md));
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    border-top: none;
}
.pq-context-verse--current + .pq-context-verse {
    border-top: none;
}
.pq-context-verse--neighbor {
    color: var(--pq-gray-700);
    text-decoration: none;
    transition: background 0.15s;
}
.pq-context-verse--neighbor:hover {
    background: var(--pq-gray-100);
    margin: 0 calc(-1 * var(--space-md));
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}
.pq-context-versenum {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pq-green);
    margin-right: 0.25em;
    vertical-align: super;
}
.pq-context-verse--current .pq-context-versenum {
    color: var(--pq-green-dark);
}
.pq-context-translit {
    display: block;
    font-style: italic;
    font-size: 0.9375rem;
    color: var(--pq-gray-600);
    margin-top: 0.15em;
}
.pq-context-translation {
    display: block;
    font-size: 0.9375rem;
    color: var(--pq-gray-700);
    margin-top: 0.15em;
    line-height: 1.6;
}
.pq-context-verse--current .pq-context-translation {
    color: var(--pq-gray-900);
    font-weight: 500;
}
.pq-context-translator-note {
    font-size: 0.8125rem;
    color: var(--pq-gray-500);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--pq-gray-200);
    text-align: right;
}
@media (max-width: 768px) {
    .pq-context-box {
        padding: var(--space-md);
    }
}

/* Translation List */
.translations-section {
    margin: var(--space-xl) 0;
}

.translations-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-green);
    display: inline-block;
}

.translation-count {
    font-size: 0.875rem;
    color: var(--pq-gray-500);
    font-weight: 400;
    margin-left: var(--space-sm);
}

.translation-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.translation-item {
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--pq-gray-200);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg);
    align-items: baseline;
}

.translator-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--pq-green-dark);
    padding-top: 2px;
}

.translation-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--pq-gray-800);
}

/* Tafsir Section on Verse Page */
.verse-tafsir-section {
    margin: var(--space-2xl) 0;
}

.tafsir-tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 2px solid var(--pq-gray-200);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.tafsir-tab {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pq-gray-600);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.tafsir-tab:hover {
    color: var(--pq-green);
}

.tafsir-tab.active {
    color: var(--pq-green-dark);
    border-bottom-color: var(--pq-green);
}

.tafsir-content-panel {
    display: none;
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    border: 1px solid var(--pq-gray-200);
}

.tafsir-content-panel.active {
    display: block;
}

.tafsir-source-name {
    font-weight: 600;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-md);
}

.tafsir-text {
    line-height: 1.8;
    color: var(--pq-gray-800);
}

/* Verse Navigation */
.verse-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--pq-gray-200);
}

.verse-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.verse-nav a:hover {
    background: var(--pq-green-pale);
    border-color: var(--pq-green);
}

/* ==========================================================================
   Hadith Collections Page
   ========================================================================== */

.tradition-section {
    margin-bottom: var(--space-2xl);
}

.tradition-heading {
    font-size: 1.5rem;
    color: var(--pq-green-dark);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-gold);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.tradition-heading .tradition-badge {
    font-size: 0.75rem;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.collection-card {
    background: var(--pq-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--pq-gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
}

.collection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pq-gold);
}

.collection-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.collection-card.coming-soon {
    opacity: 0.7;
}

.collection-card.coming-soon:hover {
    transform: none;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.collection-card h3 {
    font-size: 1.125rem;
    color: var(--pq-green-dark);
    margin-bottom: 4px;
}

.collection-arabic-name {
    font-family: var(--font-arabic);
    font-size: 1.125rem;
    color: var(--pq-gray-600);
    direction: rtl;
}

.collection-meta {
    font-size: 0.8125rem;
    color: var(--pq-gray-600);
    margin-bottom: var(--space-sm);
}

.collection-meta strong {
    color: var(--pq-gray-700);
}

.collection-desc {
    font-size: 0.875rem;
    color: var(--pq-gray-600);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.collection-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--pq-gray-200);
}

.hadith-count {
    font-size: 0.8125rem;
    color: var(--pq-gray-600);
}

.hadith-count strong {
    color: var(--pq-green-dark);
    font-size: 1rem;
}

/* ==========================================================================
   Individual Hadith Collection Page
   ========================================================================== */

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
    padding: var(--space-xl) 0 var(--space-3xl);
}

.book-card {
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid var(--pq-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.book-card:hover {
    border-color: var(--pq-green-light);
    box-shadow: var(--shadow-sm);
}

.book-name {
    font-weight: 600;
    color: var(--pq-gray-900);
}

.book-count {
    font-size: 0.8125rem;
    color: var(--pq-gray-500);
    background: var(--pq-gray-100);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Tafsir Page
   ========================================================================== */

.tafsir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.tafsir-card {
    background: var(--pq-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--pq-gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
}

.tafsir-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pq-gold);
}

.tafsir-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.tafsir-card h3 {
    font-size: 1.125rem;
    color: var(--pq-green-dark);
    margin-bottom: 4px;
}

.tafsir-arabic-name {
    font-family: var(--font-arabic);
    font-size: 1.125rem;
    color: var(--pq-gray-600);
    direction: rtl;
    margin-bottom: var(--space-sm);
}

.tafsir-methodology {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-navy);
    background: rgba(40, 53, 147, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.tafsir-meta {
    font-size: 0.8125rem;
    color: var(--pq-gray-600);
    margin-bottom: var(--space-sm);
}

.tafsir-desc {
    font-size: 0.875rem;
    color: var(--pq-gray-600);
    line-height: 1.6;
}

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

.search-results-header {
    padding: var(--space-lg) 0;
}

.search-result-item {
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--pq-gray-200);
}

.search-result-item h3 {
    margin-bottom: var(--space-sm);
}

.search-result-item h3 a {
    color: var(--pq-green-dark);
}

.search-result-item h3 a:hover {
    color: var(--pq-green);
}

.search-result-type {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    margin-bottom: var(--space-sm);
}

.search-result-excerpt {
    font-size: 0.9375rem;
    color: var(--pq-gray-700);
    line-height: 1.6;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404-content {
    text-align: center;
    padding: var(--space-3xl) 0;
    max-width: 500px;
    margin: 0 auto;
}

.error-404-content h1 {
    font-size: 5rem;
    color: var(--pq-green);
    margin-bottom: var(--space-sm);
}

.error-404-content p {
    font-size: 1.125rem;
    color: var(--pq-gray-600);
    margin-bottom: var(--space-xl);
}

.error-404-content .btn-home {
    display: inline-block;
    padding: var(--space-md) var(--space-2xl);
    background: var(--pq-green);
    color: var(--pq-white);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background var(--transition-fast);
}

.error-404-content .btn-home:hover {
    background: var(--pq-green-dark);
    color: var(--pq-white);
}

/* ==========================================================================
   WordPress Defaults & Accessibility
   ========================================================================== */

.alignleft { float: left; margin-right: var(--space-lg); margin-bottom: var(--space-md); }
.alignright { float: right; margin-left: var(--space-lg); margin-bottom: var(--space-md); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: var(--space-md); }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--pq-gray-600); }

.sticky { border-left: 3px solid var(--pq-gold); }
.gallery-caption { font-size: 0.875rem; }
.bypostauthor { border-left: 3px solid var(--pq-green); }

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--pq-green-dark);
    color: var(--pq-white);
    padding: var(--space-sm) var(--space-md);
    z-index: 10000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    color: var(--pq-white);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .collection-grid,
    .tafsir-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* Header Mobile */
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--pq-green-dark);
        padding: var(--space-md) var(--space-lg);
        box-shadow: var(--shadow-lg);
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        padding: var(--space-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header-search {
        display: none;
    }

    .main-navigation.toggled + .header-search {
        display: block;
        position: absolute;
        top: calc(var(--header-height) + 100%);
        left: 0;
        right: 0;
        padding: var(--space-md) var(--space-lg);
        background: var(--pq-green-dark);
    }

    /* Hero Mobile */
    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .hero .bismillah {
        font-size: 1.5rem;
    }

    .hero-search input[type="search"] {
        width: auto;
        min-width: 0;
    }

    /* Section Cards Mobile */
    .section-cards {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-xl) 0;
    }

    /* Quick Stats Mobile */
    .quick-stats {
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Surah Grid Mobile */
    .surah-grid {
        grid-template-columns: 1fr;
    }

    /* Translations Mobile */
    .translation-item {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .translator-name {
        padding-bottom: var(--space-xs);
        border-bottom: 1px solid var(--pq-gray-200);
    }

    /* Verse Display Mobile */
    .verse-arabic-main {
        font-size: 1.75rem;
    }

    /* Footer Mobile */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    /* Page Headers Mobile */
    .page-header h1 {
        font-size: 1.5rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    /* Book List Mobile */
    .book-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .hero h1 {
        font-size: 1.625rem;
    }

    .verse-arabic-main {
        font-size: 1.5rem;
        line-height: 2;
    }

    .ayah-arabic {
        font-size: 1.375rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .verse-nav,
    .surah-filters,
    .hero-search,
    .menu-toggle {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .arabic-text,
    .verse-arabic-main,
    .ayah-arabic {
        font-size: 18pt;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ==========================================================================
   Live Search Dropdown
   ========================================================================== */

.live-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pq-white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--pq-gray-200);
    border-top: none;
}

.live-search-dropdown.active {
    display: block;
}

/* When inside the header search, position more specifically */
.header-search-form .live-search-dropdown {
    min-width: 360px;
    right: 0;
    left: auto;
}

/* When inside the hero search */
.hero-search .live-search-dropdown {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.live-search-item {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--pq-gray-100);
    text-decoration: none;
    color: var(--pq-gray-900);
    transition: background var(--transition-fast);
}

.live-search-item:hover,
.live-search-item.focused {
    background: var(--pq-green-pale);
    color: var(--pq-gray-900);
}

.live-search-item:last-of-type {
    border-bottom: none;
}

.live-search-item-main {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.live-search-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

.live-search-type--ayah {
    background: rgba(27, 94, 32, 0.1);
    color: var(--pq-green-dark);
}

.live-search-type--surah {
    background: rgba(40, 53, 147, 0.1);
    color: var(--pq-navy);
}

.live-search-type--hadith {
    background: rgba(197, 165, 90, 0.15);
    color: #8B7340;
}

.live-search-type--tafsir {
    background: rgba(106, 27, 154, 0.1);
    color: #6A1B9A;
}

.live-search-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-search-title mark {
    background: var(--pq-gold-light);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.live-search-ref {
    display: block;
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    margin-left: calc(6px + var(--space-sm));
    padding-left: calc(0.6875rem * 5 + 6px);
}

.live-search-arabic {
    font-family: var(--font-arabic);
    direction: rtl;
    text-align: right;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--pq-gray-700);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-search-empty {
    padding: var(--space-md);
    text-align: center;
    font-size: 0.875rem;
    color: var(--pq-gray-500);
}

.live-search-view-all {
    display: block;
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-green);
    border-top: 1px solid var(--pq-gray-200);
    transition: background var(--transition-fast);
}

.live-search-view-all:hover {
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
}

/* ==========================================================================
   Enhanced Search Results Page
   ========================================================================== */

.search-result-item {
    background: var(--pq-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--pq-gray-200);
    transition: border-color var(--transition-fast);
}

.search-result-item:hover {
    border-color: var(--pq-green-light);
}

.search-result-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.search-result-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
}

.search-result-type--hadith {
    background: rgba(197, 165, 90, 0.15);
    color: #8B7340;
}

.search-result-type--tafsir {
    background: rgba(106, 27, 154, 0.1);
    color: #6A1B9A;
}

.search-result-type--root_word {
    background: rgba(40, 53, 147, 0.1);
    color: var(--pq-navy);
}

.search-result-icon {
    font-style: normal;
}

.search-result-ref {
    font-size: 0.8125rem;
    color: var(--pq-gray-500);
    font-weight: 500;
}

.search-result-item h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.search-result-item h3 a {
    color: var(--pq-green-dark);
}

.search-result-item h3 a:hover {
    color: var(--pq-green);
}

.search-result-arabic {
    font-family: var(--font-arabic);
    direction: rtl;
    text-align: right;
    font-size: 1.375rem;
    line-height: 2;
    color: var(--pq-gray-800);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--pq-gray-100);
    margin-bottom: var(--space-sm);
}

.search-result-translation {
    font-size: 0.9375rem;
    color: var(--pq-gray-700);
    line-height: 1.6;
}

.search-result-translator {
    font-weight: 600;
    color: var(--pq-green-dark);
    margin-right: var(--space-xs);
}

.search-result-excerpt {
    font-size: 0.9375rem;
    color: var(--pq-gray-700);
    line-height: 1.6;
}

.search-result-meta-detail {
    font-size: 0.8125rem;
    color: var(--pq-gray-500);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--pq-gray-100);
}

.search-no-results {
    text-align: center;
    padding: var(--space-3xl) 0;
    max-width: 500px;
    margin: 0 auto;
}

.search-no-results h2 {
    color: var(--pq-gray-700);
}

.search-no-results p {
    color: var(--pq-gray-600);
    font-size: 1.0625rem;
}

.search-suggestions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

.search-suggestion-btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-xl);
    color: var(--pq-white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: opacity var(--transition-fast);
}

.search-suggestion-btn:hover {
    color: var(--pq-white);
    opacity: 0.9;
}

.search-suggestion-btn--quran { background: var(--pq-green); }
.search-suggestion-btn--hadith { background: var(--pq-navy); }
.search-suggestion-btn--tafsir { background: var(--pq-gold-dark); }

.search-again {
    border-bottom: 1px solid var(--pq-gray-200);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
}

/* Responsive adjustments for live search */
@media (max-width: 768px) {
    .header-search-form .live-search-dropdown {
        min-width: auto;
        left: 0;
        right: 0;
        position: fixed;
        top: var(--header-height);
        border-radius: 0;
        max-height: 60vh;
    }

    .search-result-arabic {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   Landing Page — Section Search
   ========================================================================== */

.section-search {
    background: var(--pq-cream);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--pq-divider);
}

.section-search-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--pq-white);
    border: 2px solid var(--pq-divider);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-scope-dropdown {
    flex-shrink: 0;
    border-right: 2px solid var(--pq-divider);
    padding: var(--space-md) var(--space-lg);
    background: var(--pq-gray-50);
}

.search-scope-dropdown select {
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    cursor: pointer;
    padding-right: var(--space-sm);
}

.section-search-inner input[type="search"] {
    flex: 1;
    border: none;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--pq-charcoal);
    outline: none;
    background: transparent;
}

.section-search-inner input[type="search"]::placeholder {
    color: var(--pq-gray-500);
}

/* ==========================================================================
   Landing Page — Section Hero
   ========================================================================== */

.section-hero {
    background: var(--pq-green-dark);
    color: #fff;
    padding: var(--space-3xl) 0;
}

.section-hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section-hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    color: var(--pq-gold);
    margin: 0 0 var(--space-sm);
    line-height: 1.2;
}

.section-hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

/* ==========================================================================
   Landing Page — Two Column Layout
   ========================================================================== */

.landing-content {
    max-width: var(--container-max);
    margin: 0 auto;
    /* v2.66.50: trim top padding so hero + cards aren't separated by huge gap */
    padding: var(--space-lg) var(--space-lg) var(--space-2xl);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-2xl);
    align-items: start;
}

/* v2.66.3z23: modifier for pages that suppress the outer .landing-sidebar */
.landing-content--no-sidebar {
    grid-template-columns: 1fr;
}
.landing-content--no-sidebar > .landing-sidebar {
    display: none;
}

/*
 * v2.66.4z23: belt-and-suspenders safety net.
 * Tafsir Everyone mode renders its own in-mode research rail (pq-tf-rail)
 * inside .landing-main, so the outer .landing-sidebar (View As + Quick Jump)
 * must be suppressed to give the data table full width. The body class
 * pq-tafsir-mode-everyone is added via the body_class filter in functions.php.
 */
body.pq-tafsir-mode-everyone .landing-content {
    grid-template-columns: 1fr !important;
}
body.pq-tafsir-mode-everyone .landing-content > .landing-sidebar {
    display: none !important;
}

.landing-main {
    min-width: 0;
}

.landing-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
    /* v2.66.50: section-cards no longer has top padding, so sidebar lines up naturally */
}

/* ==========================================================================
   View As Sidebar
   ========================================================================== */

.viewas-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.viewas-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
}

.viewas-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.viewas-pill {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--pq-green-dark);
    border-radius: 999px;
    background: transparent;
    color: var(--pq-green-dark);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 200ms ease;
    font-family: var(--font-body);
}

.viewas-pill:hover {
    background: var(--pq-green-pale);
}

.viewas-pill.active {
    background: var(--pq-green-dark);
    color: #fff;
}

/* Sidebar Quick Jump */
.sidebar-section {
    margin-bottom: var(--space-lg);
}

.sidebar-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-gold);
    margin: 0 0 var(--space-sm);
    font-family: Georgia, 'Times New Roman', serif;
}

.sidebar-section-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-charcoal);
    margin: var(--space-sm) 0 var(--space-xs);
}

.sidebar-juz-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sidebar-juz-grid a {
    display: inline-block;
    color: var(--pq-navy-dark);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    padding: 2px 4px;
    transition: color 200ms ease;
}

.sidebar-juz-grid a:hover {
    color: var(--pq-gold);
}

.sidebar-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-link-list li {
    margin-bottom: var(--space-xs);
}

.sidebar-link-list a {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 200ms ease;
}

.sidebar-link-list a:hover {
    color: var(--pq-gold);
}

.sidebar-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
}

.sidebar-inline-links a {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 200ms ease;
}

.sidebar-inline-links a:hover {
    color: var(--pq-gold);
}

.sidebar-inline-links .sep {
    color: var(--pq-gray-400);
}

.sidebar-arabic-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    direction: rtl;
}

.sidebar-arabic-letters a {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    color: var(--pq-green-dark);
    text-decoration: none;
    transition: color 200ms ease;
}

.sidebar-arabic-letters a:hover {
    color: var(--pq-gold);
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--pq-divider);
    margin: var(--space-md) 0;
}

.sidebar-quick-jump {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-sm);
}
.sidebar-jump-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--pq-gray-700);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sidebar-jump-link:hover {
    background: var(--pq-green-pale, rgba(45,106,79,0.06));
    color: var(--pq-green-dark);
}
.sidebar-jump-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.sidebar-jump-group-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pq-green, #0d7c3e);
    padding: var(--space-xs) var(--space-sm) 2px;
}
.sidebar-inline-links {
    padding: 0 var(--space-sm);
    font-size: 0.8125rem;
}
.sidebar-inline-links a {
    color: var(--pq-gray-600);
    text-decoration: none;
    margin-right: var(--space-sm);
}
.sidebar-inline-links a:hover {
    color: var(--pq-green-dark);
}

.sidebar-tool-item {
    display: block;
    margin-bottom: var(--space-sm);
}

.sidebar-tool-item strong {
    display: block;
    color: var(--pq-charcoal);
    font-size: 0.9rem;
}

.sidebar-tool-item span {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
}

.sidebar-hadith-day {
    margin-top: var(--space-sm);
    padding: var(--space-md);
    background: var(--pq-cream);
    border-radius: var(--radius-md);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--pq-charcoal);
    line-height: 1.6;
}

.sidebar-hadith-day cite {
    display: block;
    margin-top: var(--space-xs);
    font-style: normal;
    font-weight: 600;
    color: var(--pq-green-dark);
}

.sidebar-stat-big {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    line-height: 1;
    display: block;
}

.sidebar-stat-label {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
    display: block;
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Landing Page — Feature Cards (Alternating Colors)
   ========================================================================== */

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.feature-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
    transition: box-shadow 200ms ease;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
}

.feature-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.feature-card:nth-child(even) {
    background: var(--pq-light-gold);
}

.feature-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-sm);
}

.feature-card-text {
    font-size: 0.9rem;
    color: var(--pq-charcoal);
    line-height: 1.6;
    margin: 0;
}

a.feature-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
    cursor: pointer;
}

a.feature-card-link:hover {
    box-shadow: var(--shadow-lg, 0 4px 12px rgba(0,0,0,0.12));
    border-color: var(--pq-green);
}

a.feature-card-link:hover .feature-card-title {
    color: var(--pq-gold);
}

.feature-card a.feature-card-title {
    text-decoration: none;
    transition: color 200ms ease;
}

.feature-card a.feature-card-title:hover {
    color: var(--pq-gold);
}

.feature-card--highlight {
    background: linear-gradient(135deg, var(--pq-green-pale) 0%, rgba(45,106,79,0.12) 100%) !important;
    border: 2px solid var(--pq-green) !important;
    position: relative;
}
.feature-card--highlight:hover {
    box-shadow: 0 4px 20px rgba(45,106,79,0.15);
}

/* Story Cards (3×2 grid for kids mode) */
.story-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.story-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
    transition: box-shadow 200ms ease;
    text-decoration: none;
    display: block;
}

.story-card:hover {
    box-shadow: var(--shadow-md);
}

.story-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.story-card:nth-child(even) {
    background: var(--pq-light-gold);
}

.story-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-sm);
}

.story-card-text {
    font-size: 0.85rem;
    color: var(--pq-charcoal);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Landing Page — Surah Table (Everyone Mode)
   ========================================================================== */

.surah-table-wrap {
    overflow-x: auto;
    margin-bottom: var(--space-2xl);
}

.surah-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.surah-table thead th {
    background: var(--pq-green-dark);
    color: #fff;
    padding: var(--space-sm) var(--space-sm);
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.surah-table tbody tr {
    transition: color 200ms ease;
    cursor: pointer;
}

.surah-table tbody tr:nth-child(odd) {
    background: var(--pq-cream);
}

.surah-table tbody tr:nth-child(even) {
    background: var(--pq-white);
}

.surah-table tbody tr:hover {
    color: var(--pq-green-dark);
    background: var(--pq-green-pale);
}

.surah-table tbody td {
    padding: var(--space-sm) var(--space-sm);
    border-bottom: 1px solid var(--pq-divider);
    vertical-align: middle;
}

.surah-table .col-num {
    text-align: center;
    font-weight: 600;
    width: 32px;
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
}

.surah-table .col-arabic {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    direction: rtl;
}

.surah-table .col-ayat,
.surah-table .col-juz {
    text-align: center;
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
}

.surah-table .col-type {
    text-align: center;
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
}

.surah-table .col-ruku,
.surah-table .col-order {
    text-align: center;
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
}

.surah-table .col-meaning {
    color: var(--pq-gray-600);
    font-size: 0.85rem;
}

.surah-table td a {
    color: inherit;
    text-decoration: none;
}

.surah-table td a:hover {
    color: var(--pq-gold);
}

/* ---------- Sortable column headers ---------- */
.surah-table thead th.pq-sortable {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    padding-right: calc(var(--space-sm) + 12px);
    transition: background var(--transition-fast);
}

.surah-table thead th.pq-sortable:hover {
    background: var(--pq-green);
}

/* Sort arrow container */
.pq-sort-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.35;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid #fff;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

/* Default: dim up-arrow (▲) hint */
.surah-table thead th.pq-sortable:hover .pq-sort-arrow {
    opacity: 0.6;
}

/* ASC active: solid up-arrow ▲ */
.surah-table thead th.pq-sort-asc .pq-sort-arrow {
    opacity: 1;
    border-bottom: 5px solid #fff;
    border-top: none;
}

/* DESC active: solid down-arrow ▼ */
.surah-table thead th.pq-sort-desc .pq-sort-arrow {
    opacity: 1;
    border-top: 5px solid #fff;
    border-bottom: none;
}

/* ==========================================================================
   Landing Page — Collection Cards (Hadith Everyone)
   ========================================================================== */

.collection-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.collection-card-mini {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
    text-decoration: none;
    display: block;
    transition: box-shadow 200ms ease;
}

.collection-card-mini:hover {
    box-shadow: var(--shadow-md);
}

.collection-card-mini:nth-child(odd) {
    background: var(--pq-green-pale);
}

.collection-card-mini:nth-child(even) {
    background: var(--pq-light-gold);
}

.collection-card-mini-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-xs);
}

.collection-card-mini-compiler {
    font-size: 0.85rem;
    color: var(--pq-charcoal);
    margin: 0 0 var(--space-xs);
}

.collection-card-mini-count {
    font-size: 0.85rem;
    color: var(--pq-gold);
    font-weight: 600;
}

.other-collections {
    font-size: 0.9rem;
    color: var(--pq-gray-600);
    margin-bottom: var(--space-2xl);
}

.other-collections a {
    color: var(--pq-green-dark);
    text-decoration: none;
    transition: color 200ms ease;
}

.other-collections a:hover {
    color: var(--pq-gold);
}

/* ==========================================================================
   Landing Page — Grading Table (Hadith Scholar)
   ========================================================================== */

.grading-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: var(--space-2xl);
}

.grading-table thead th {
    background: var(--pq-green-dark);
    color: #fff;
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.grading-table tbody tr:nth-child(odd) {
    background: var(--pq-cream);
}

.grading-table tbody tr:nth-child(even) {
    background: var(--pq-white);
}

.grading-table tbody td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--pq-divider);
}

/* ==========================================================================
   Landing Page — Suggested List (New to Islam)
   ========================================================================== */

.suggested-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pq-gold);
    margin: 0 0 var(--space-md);
    font-family: Georgia, 'Times New Roman', serif;
}

.suggested-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-2xl);
}

.suggested-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--pq-divider);
    transition: background 200ms ease;
}

.suggested-list li:hover {
    background: var(--pq-green-pale);
}

.suggested-list li a {
    color: var(--pq-charcoal);
    text-decoration: none;
    font-weight: 500;
    transition: color 200ms ease;
}

.suggested-list li a:hover {
    color: var(--pq-green-dark);
}

.suggested-list .suggested-desc {
    color: var(--pq-gray-600);
    font-size: 0.85rem;
    font-style: italic;
}

/* ==========================================================================
   Landing Page — Verse Display (Tafsir Everyone)
   ========================================================================== */

.verse-display-bar {
    background: var(--pq-green-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xl);
    color: #fff;
}

.verse-display-ref {
    font-size: 0.9rem;
    color: var(--pq-gold);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.verse-display-text {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.verse-selector-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    font-size: 0.9rem;
    color: var(--pq-gray-600);
}

.verse-selector-bar a {
    color: var(--pq-green-dark);
    text-decoration: none;
    transition: color 200ms ease;
}

.verse-selector-bar a:hover {
    color: var(--pq-gold);
}

.verse-selector-bar .active-filter {
    color: var(--pq-green-dark);
    font-weight: 600;
}

/* ==========================================================================
   Landing Page — Arabic Letter Grid (Lexicon)
   ========================================================================== */

.letter-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}

.letter-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--pq-divider);
    font-family: var(--font-arabic);
    font-size: 2rem;
    text-decoration: none;
    color: var(--pq-charcoal);
    transition: all 200ms ease;
    direction: rtl;
}

.letter-cell:nth-child(odd) {
    background: var(--pq-green-pale);
}

.letter-cell:nth-child(even) {
    background: var(--pq-light-gold);
}

.letter-cell:hover {
    background: var(--pq-green-dark);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.letter-cell:hover .letter-cell-count {
    color: rgba(255,255,255,0.75);
}

/* Letter grid with root counts */
.letter-grid--with-counts .letter-cell {
    flex-direction: column;
    gap: 0.2rem;
    padding: var(--space-md) var(--space-sm);
}
.letter-cell-char {
    line-height: 1.1;
}
.letter-cell-count {
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
    letter-spacing: 0.01em;
    direction: ltr;
}

/* Top Roots */
.top-roots-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pq-gold);
    margin: 0 0 var(--space-md);
    font-family: Georgia, 'Times New Roman', serif;
}

.top-roots-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-roots-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--pq-divider);
}

.top-roots-list .root-arabic {
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    direction: rtl;
    color: var(--pq-green-dark);
}

.top-roots-list .root-count {
    font-size: 0.85rem;
    color: var(--pq-gray-600);
}

/* Walkthrough (Lexicon Scholar) */
.walkthrough-box {
    background: var(--pq-cream);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.walkthrough-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-gold);
    margin: 0 0 var(--space-lg);
    font-family: Georgia, 'Times New Roman', serif;
}

.walkthrough-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    align-items: center;
}

.walkthrough-step {
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.walkthrough-step:nth-child(odd) {
    background: var(--pq-green-pale);
}

.walkthrough-step:nth-child(even) {
    background: var(--pq-light-gold);
}

.walkthrough-step-label {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    display: block;
    margin-bottom: var(--space-xs);
}

.walkthrough-step-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    display: block;
}

.walkthrough-step .arabic-big {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    direction: rtl;
}

.walkthrough-arrow {
    text-align: center;
    color: var(--pq-gold);
    font-size: 1.5rem;
}

/* ==========================================================================
   Landing Page — Stats Bar
   ========================================================================== */

.stats-bar {
    background: #0D3311;
    color: var(--pq-gold);
    padding: var(--space-md) 0;
    text-align: center;
    font-size: 0.9rem;
}

.stats-bar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.stats-bar-item {
    white-space: nowrap;
}

.stats-bar-item + .stats-bar-item::before {
    content: '|';
    margin-right: var(--space-lg);
    opacity: 0.4;
}

/* ==========================================================================
   Hover Effects (CRITICAL — global)
   ========================================================================== */

/* Green text links → gold on hover */
a {
    transition: color 200ms ease;
}

.site-header a:hover,
.main-navigation a:hover,
.sidebar-link-list a:hover,
.sidebar-inline-links a:hover,
.sidebar-arabic-letters a:hover,
.sidebar-juz-grid a:hover,
.other-collections a:hover {
    color: var(--pq-gold) !important;
}

/* Dark text → green on hover */
.surah-table tbody tr:hover td,
.suggested-list li:hover a,
.collection-card-mini:hover .collection-card-mini-title {
    color: var(--pq-green-dark);
}

/* ==========================================================================
   Landing Page — Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .landing-content {
        grid-template-columns: 1fr;
    }

    .landing-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .section-hero-title {
        font-size: 1.8rem;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .story-cards {
        grid-template-columns: 1fr 1fr;
    }

    .collection-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .letter-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .walkthrough-steps {
        grid-template-columns: 1fr 1fr;
    }

    .walkthrough-arrow {
        display: none;
    }

    .stats-bar-inner {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }

    .stats-bar-item + .stats-bar-item::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .story-cards {
        grid-template-columns: 1fr;
    }

    .collection-cards-grid {
        grid-template-columns: 1fr;
    }

    .viewas-pills {
        grid-template-columns: 1fr 1fr;
    }

    .letter-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-search-inner {
        flex-direction: column;
    }

    .search-scope-dropdown {
        border-right: none;
        border-bottom: 2px solid var(--pq-divider);
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Verse Page Layout
   ========================================================================== */

.verse-page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem 0;
}

.verse-main-content {
    min-width: 0;
}

.verse-sidebar,
.cross-ref-sidebar {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 1.5rem - 1rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--pq-gray-300, #ccc) transparent;
    padding-bottom: 1.5rem;
}
.verse-sidebar::-webkit-scrollbar,
.cross-ref-sidebar::-webkit-scrollbar {
    width: 5px;
}
.verse-sidebar::-webkit-scrollbar-track,
.cross-ref-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.verse-sidebar::-webkit-scrollbar-thumb,
.cross-ref-sidebar::-webkit-scrollbar-thumb {
    background: var(--pq-gray-300, #ccc);
    border-radius: 3px;
}
.verse-sidebar::-webkit-scrollbar-thumb:hover,
.cross-ref-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--pq-gray-400, #999);
}

/* Transliteration */
.verse-transliteration {
    font-style: italic;
    font-size: 1.15rem;
    color: var(--pq-gray-600);
    padding: 1rem 1.5rem;
    background: var(--pq-gray-50);
    border-left: 3px solid var(--pq-gold);
    margin: 1rem 0 2rem;
    line-height: 1.8;
}

/* Translations Section - Parallel Study Style */
.translations-section {
    margin: 2rem 0;
}

.translations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.translations-header h2 {
    margin: 0;
}

.translation-filter-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--pq-gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 220px;
    transition: border-color 0.2s;
}

.translation-filter-input:focus {
    outline: none;
    border-color: var(--pq-green);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.translation-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
}

.translation-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--pq-gray-200);
}

.translation-item:last-child {
    border-bottom: none;
}

.translation-item:nth-child(odd) {
    background: var(--pq-cream);
}

.translation-item:nth-child(even) {
    background: var(--pq-white);
}

.translator-name {
    font-weight: 600;
    color: var(--pq-green);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.translation-text {
    line-height: 1.7;
    color: var(--pq-gray-800);
}

/* Morphology Interlinear */
.morphology-section {
    margin: 2rem 0;
}

.morphology-interlinear {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    padding: 1.5rem;
    background: var(--pq-cream);
    border-radius: 8px;
    border: 1px solid var(--pq-gray-200);
}

.morphology-word {
    text-align: center;
    padding: 1rem;
    background: var(--pq-white);
    border-radius: 8px;
    border: 1px solid var(--pq-gray-200);
    min-width: 100px;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.morphology-word:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}

.morphology-word--linked {
    cursor: pointer;
}

.morphology-word--linked:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.18);
}

.morph-arabic-link {
    color: inherit;
    text-decoration: none;
}

.morph-arabic-link:hover {
    color: var(--pq-green, #2E7D32);
}

.morph-arabic {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--pq-green-dark);
}

.morph-english {
    font-size: 0.85rem;
    color: var(--pq-gray-700);
    margin-bottom: 0.35rem;
    font-style: italic;
}

.morph-root {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
    margin-bottom: 0.25rem;
}

.morph-root a {
    color: var(--pq-green);
    text-decoration: none;
}

.morph-root a:hover {
    color: var(--pq-gold);
}

.morph-label {
    font-weight: 500;
}

.morph-pos {
    font-size: 0.75rem;
    display: inline-block;
    margin-top: auto;
    /* push to bottom of flex column so all cards align */
    /* When POS color badges are enabled, this container just wraps the pill.
       When disabled, apply the old green background. */
}

/* Legacy fallback: when morph-pos contains plain text (no .pq-pos-pill child) */
.morph-pos:not(:has(.pq-pos-pill)) {
    color: var(--pq-white);
    background: var(--pq-green);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.morph-features {
    font-size: 0.7rem;
    color: var(--pq-gray-500);
    margin-top: 0.25rem;
}

/* ==============================================
   Verse Lexicon — parallel-study Redesign
   ============================================== */

.verse-lexicon-section {
    margin: 2.5rem 0;
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    overflow: hidden;
    background: var(--pq-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Green heading bar */
.vlex-heading {
    background: var(--pq-green-dark);
    color: var(--pq-white);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vlex-heading-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vlex-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--pq-white);
    letter-spacing: 0.02em;
}

.vlex-translator-label {
    font-weight: 700;
    margin-right: 0.35rem;
}

.vlex-heading-right {
    display: flex;
    align-items: center;
}

.vlex-translator-dropdown {
    background: rgba(255, 255, 255, 0.15);
    color: var(--pq-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: auto;
    max-width: 220px;
}

.vlex-translator-dropdown:hover,
.vlex-translator-dropdown:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
}

.vlex-translator-dropdown option {
    background: var(--pq-white);
    color: var(--pq-gray-800);
}

/* Verse text beneath heading */
.vlex-verse-text {
    background: var(--pq-green-pale);
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--pq-gray-700);
    border-bottom: 1px solid var(--pq-gray-200);
    font-style: italic;
}

/* Table */
.vlex-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vlex-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* Column headers — green sub-header */
.vlex-col-headers {
    background: var(--pq-green);
}

.vlex-col-headers th {
    color: var(--pq-white);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--pq-green-dark);
    white-space: nowrap;
}

.vlex-col-arabic {
    text-align: right !important;
}

/* Rows */
.vlex-row {
    border-bottom: 1px solid var(--pq-gray-200);
    transition: background 0.15s;
}

.vlex-row:hover {
    background: var(--pq-green-pale);
}

.vlex-row:nth-child(even) {
    background: var(--pq-gray-50);
}

.vlex-row:nth-child(even):hover {
    background: var(--pq-green-pale);
}

.vlex-cell {
    padding: 0.65rem 1rem;
    vertical-align: middle;
}

/* English / Translation column */
.vlex-cell-english {
    min-width: 120px;
}

.vlex-english-word {
    display: block;
    font-weight: 500;
    color: var(--pq-gray-800);
    margin-bottom: 0.2rem;
}

/* Grammar badges */
.vlex-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    line-height: 1.4;
}

.vlex-badge--noun {
    background: #E3F2FD;
    color: #1565C0;
}

.vlex-badge--verb {
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
}

.vlex-badge--adj {
    background: var(--pq-light-gold);
    color: #8D6E00;
}

.vlex-badge--particle {
    background: var(--pq-gray-200);
    color: var(--pq-gray-700);
}

.vlex-badge--other {
    background: #F3E5F5;
    color: #6A1B9A;
}

/* Arabic column — right-aligned stack: Arabic on top, transliteration beneath
   The transliteration end aligns with the Arabic start (both right-aligned). */
.vlex-cell-arabic {
    text-align: right;
    min-width: 100px;
}

.vlex-arabic-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;  /* RTL context: flex-start = right edge */
    direction: rtl;
}

.vlex-arabic-link {
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--pq-gray-900);
    text-decoration: none;
    display: block;
}

.vlex-arabic-link:hover {
    color: var(--pq-green);
}

.vlex-translit {
    display: block;
    font-size: 0.75rem;
    font-style: italic;
    color: var(--pq-gray-500);
    margin-top: 0.15rem;
    direction: ltr;
    text-align: right;
}

/* Lane's column */
.vlex-cell-lanes {
    min-width: 140px;
    max-width: 220px;
}

.vlex-lanes-link {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
}

.vlex-lanes-link:hover {
    color: var(--pq-gold);
    text-decoration: underline;
}

.vlex-lanes-link--see {
    color: var(--pq-gray-500);
    font-style: italic;
    font-size: 0.8rem;
}

/* Root column */
.vlex-cell-root {
    text-align: center;
    white-space: nowrap;
}

.vlex-root-link {
    font-size: 1.15rem;
    color: var(--pq-green);
    text-decoration: none;
    font-weight: 500;
}

.vlex-root-link:hover {
    color: var(--pq-gold);
}

/* Occurrence count badge */
.vlex-occ {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pq-gray-500);
    background: var(--pq-gray-100);
    border: 1px solid var(--pq-gray-300);
    border-radius: 10px;
    padding: 0.05rem 0.4rem;
    margin-left: 0.35rem;
    vertical-align: middle;
    cursor: help;
}

/* Morphology column */
.vlex-cell-morphology {
    min-width: 100px;
}

.vlex-morphology-text {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
    line-height: 1.4;
}

.vlex-origin-tag {
    font-size: 0.82rem;
    color: var(--pq-gray-600);
}

/* Lane's gloss fallback (non-linked, from English word) */
.vlex-lanes-gloss {
    font-size: 0.85rem;
    color: var(--pq-gray-600);
    font-style: italic;
}

/* Credit line */
.vlex-credit {
    margin-left: 1rem;
    color: var(--pq-gray-400);
    font-size: 0.75rem;
}

/* Empty cell dash */
.vlex-empty {
    color: var(--pq-gray-400);
}

/* Footer note */
.vlex-footer {
    padding: 0.6rem 1.25rem;
    background: var(--pq-gray-50);
    border-top: 1px solid var(--pq-gray-200);
}

.vlex-note {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
    margin: 0;
}

.vlex-note a {
    color: var(--pq-green);
    text-decoration: none;
    font-weight: 500;
}

.vlex-note a:hover {
    color: var(--pq-gold);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .vlex-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .vlex-translator-dropdown {
        max-width: 100%;
        width: 100%;
    }

    .vlex-table {
        font-size: 0.82rem;
    }

    .vlex-col-headers th {
        font-size: 0.7rem;
        padding: 0.5rem 0.6rem;
    }

    .vlex-cell {
        padding: 0.5rem 0.6rem;
    }

    .vlex-arabic-link {
        font-size: 1.25rem;
    }

    .vlex-cell-lanes {
        min-width: 100px;
    }

    /* Hide morphology column on very small screens */
    .vlex-col-morphology,
    .vlex-cell-morphology {
        display: none;
    }
}

@media (max-width: 480px) {
    .vlex-cell-lanes,
    .vlex-col-lanes {
        display: none;
    }

    .vlex-title {
        font-size: 1rem;
    }
}


/* ===== Verse Lexicon Navigation (prev/next within lexicon) ===== */
.vlex-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    background: var(--pq-gray-50);
    border-bottom: 1px solid var(--pq-gray-200);
}

.vlex-nav-bottom {
    border-bottom: none;
    border-top: none;
    margin-bottom: 0.5rem;
}

.vlex-nav-left,
.vlex-nav-right {
    flex: 1;
}

.vlex-nav-right {
    text-align: right;
}

.vlex-nav-center {
    flex: 2;
    text-align: center;
}

.vlex-nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-green);
    text-decoration: none;
    transition: color 200ms ease;
}

.vlex-nav-link:hover {
    color: var(--pq-gold);
}

.vlex-nav-surah {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    text-decoration: none;
    transition: color 200ms ease;
}

.vlex-nav-surah:hover {
    color: var(--pq-gold);
}

.vlex-nav-ref {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--pq-gray-500);
}

@media (max-width: 768px) {
    .vlex-nav {
        padding: 0.4rem 0.75rem;
    }
    .vlex-nav-link {
        font-size: 0.78rem;
    }
    .vlex-nav-surah {
        font-size: 0.85rem;
    }
}

/* ===== Lexicon Landing Page Section Headings ===== */
.lexicon-section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: var(--space-2xl) 0 var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--pq-green);
}

.lexicon-section-desc {
    font-size: 0.92rem;
    color: var(--pq-gray-600);
    margin: 0 0 var(--space-lg);
    line-height: 1.6;
}

/* ===== Hadith Verse References ===== */
.verse-hadith-refs {
    margin: var(--space-xl) 0;
    padding: 0;
}
.hadith-refs-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1a5632);
    margin: 0 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-green, #2d7a4f);
}
.hadith-refs-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: var(--pq-green, #2d7a4f);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}
.hadith-refs-toggle {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--pq-green, #2d7a4f);
    opacity: 0.7;
}
.hadith-refs-toggle:hover {
    opacity: 1;
}
.hadith-refs-notice {
    background: #f0f7f3;
    border: 1px solid #d4e8dc;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: var(--space-md);
}
.hadith-refs-notice a {
    color: var(--pq-green, #2d7a4f);
    text-decoration: underline;
}
.hadith-refs-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.hadith-ref-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    transition: box-shadow 0.2s;
}
.hadith-ref-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.hadith-ref-card--collapsed {
    display: none;
}
.hadith-ref-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.hadith-ref-collection {
    font-weight: 700;
    color: var(--pq-green-dark, #1a5632);
    font-size: 0.95rem;
}
.hadith-ref-number {
    color: #888;
    font-size: 0.85rem;
    font-family: var(--font-mono, monospace);
}
.hadith-ref-grade {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hadith-ref-grade--sahih {
    background: #d4edda;
    color: #155724;
}
.hadith-ref-grade--hasan {
    background: #fff3cd;
    color: #856404;
}
.hadith-ref-narrator {
    font-size: 0.85rem;
    color: var(--pq-gold, #b8860b);
    font-style: italic;
    margin-bottom: 8px;
}
.hadith-ref-body {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #444;
}
.hadith-ref-body p {
    margin: 0;
}
.hadith-ref-footer {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.hadith-ref-source-text {
    font-size: 0.75rem;
    color: var(--pq-gray-400, #bbb);
    font-weight: 400;
}
.hadith-ref-local-link {
    font-size: 0.8rem;
    color: var(--pq-green, #2d7a4f);
    text-decoration: none;
    font-weight: 500;
}
.hadith-ref-local-link:hover {
    text-decoration: underline;
}
.hadith-refs-show-more {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: var(--pq-green, #2d7a4f);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}
.hadith-refs-show-more:hover {
    background: #f0f7f3;
}
@media (max-width: 600px) {
    .hadith-ref-card {
        padding: 12px 14px;
    }
    .hadith-refs-heading {
        font-size: 1.1rem;
    }
}

/* Tafsir Enhancements */
.tafsir-tab-all {
    background: var(--pq-gold);
    color: var(--pq-white);
}

.tafsir-tab-all:hover {
    background: var(--pq-gold-dark);
}

.tafsir-source-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tafsir-source-header .tafsir-source-name a {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.tafsir-source-header .tafsir-source-name a:hover {
    color: var(--pq-gold);
}

.tafsir-tradition-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    border-radius: 12px;
    font-weight: 500;
}

.tafsir-all-entry {
    padding: 1.5rem;
    border-bottom: 2px solid var(--pq-gray-200);
}

.tafsir-all-entry:last-child {
    border-bottom: none;
}

/* Cross-Reference Sidebar */
.cross-ref-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.cross-ref-sidebar .sidebar-section {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.cross-ref-sidebar .sidebar-section h3 {
    font-size: 0.95rem;
    color: var(--pq-green-dark);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pq-green-pale);
}

.cross-ref-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cross-ref-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pq-gray-100);
}

.cross-ref-list li:last-child {
    border-bottom: none;
}

.cross-ref-list a {
    color: var(--pq-green);
    text-decoration: none;
    font-weight: 500;
}

.cross-ref-list a:hover {
    color: var(--pq-gold);
}

.cross-ref-source {
    display: block;
    font-size: 0.8rem;
    color: var(--pq-gray-500);
}

.root-lemma {
    font-size: 0.8rem;
    color: var(--pq-gray-500);
    margin-left: 0.5rem;
}

.verse-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.75rem;
    margin: 0;
}

.verse-info-list dt {
    font-weight: 600;
    color: var(--pq-gray-600);
    font-size: 0.85rem;
}

.verse-info-list dd {
    margin: 0;
    font-size: 0.85rem;
}

.verse-info-list dd a {
    color: var(--pq-green);
    text-decoration: none;
}

.verse-nav-link {
    border: none;
    background: none;
    color: var(--pq-green);
    font-weight: 600;
    text-decoration: none;
}

.verse-nav-link:hover {
    color: var(--pq-gold);
}

/* ==========================================================================
   Prayer Guide
   ========================================================================== */

.prayer-guide {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.prayer-guide h2 {
    color: var(--pq-green-dark);
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pq-green-pale);
}

.prayer-guide h3 {
    color: var(--pq-green);
    margin-top: 1.5rem;
}

.prayer-text-block {
    background: var(--pq-cream);
    border-left: 4px solid var(--pq-green);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.prayer-text-block .prayer-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    line-height: 2;
    direction: rtl;
    text-align: right;
    color: var(--pq-green-dark);
    margin-bottom: 0.75rem;
}

.prayer-text-block .prayer-transliteration {
    font-style: italic;
    color: var(--pq-gray-600);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.prayer-text-block .prayer-english {
    color: var(--pq-gray-700);
    line-height: 1.6;
}

.prayer-text-block.prayer-text-highlight {
    border-left-color: var(--pq-gold);
    background: var(--pq-light-gold);
}

.prayer-step {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--pq-white);
    border-radius: 8px;
    border: 1px solid var(--pq-gray-200);
}

.prayer-step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--pq-green);
    color: var(--pq-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.prayer-step-content {
    flex: 1;
}

.prayer-step-content h4 {
    margin: 0 0 0.5rem;
    color: var(--pq-green-dark);
}

.prayer-reference-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.prayer-reference-table th {
    background: var(--pq-green-dark);
    color: var(--pq-white);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.prayer-reference-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pq-gray-200);
}

.prayer-reference-table tr:nth-child(odd) td {
    background: var(--pq-green-pale);
}

.prayer-reference-table tr:nth-child(even) td {
    background: var(--pq-light-gold);
}

/* ==========================================================================
   99 Names Grid
   ========================================================================== */

.names-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.name-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.name-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
    transform: translateY(-2px);
}

.name-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.name-card:nth-child(even) {
    background: var(--pq-light-gold);
}

.name-card-number {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    margin-bottom: 0.5rem;
}

.name-card-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.75rem;
    color: var(--pq-green-dark);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    direction: rtl;
}

.name-card-transliteration {
    font-weight: 600;
    color: var(--pq-green);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.name-card-meaning {
    font-size: 0.85rem;
    color: var(--pq-gray-700);
    margin-bottom: 0.5rem;
}

.name-card-ref {
    font-size: 0.75rem;
}

.name-card-ref a {
    color: var(--pq-gold);
    text-decoration: none;
}

.name-card-ref a:hover {
    color: var(--pq-green);
}

.names-filter {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.names-filter input {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--pq-gray-300);
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
    transition: border-color 0.2s;
}

.names-filter input:focus {
    outline: none;
    border-color: var(--pq-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* ==========================================================================
   Glossary
   ========================================================================== */

.glossary-letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.glossary-letter-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}

.glossary-letter-nav a:hover,
.glossary-letter-nav a.active {
    background: var(--pq-green);
    color: var(--pq-white);
}

.glossary-filter {
    display: flex;
    justify-content: center;
    margin: 1rem 0 2rem;
}

.glossary-filter input {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--pq-gray-300);
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
}

.glossary-filter input:focus {
    outline: none;
    border-color: var(--pq-green);
}

.glossary-list {
    max-width: 800px;
    margin: 0 auto;
}

.glossary-item {
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--pq-gray-200);
    transition: border-color 0.2s;
}

.glossary-item:nth-child(odd) {
    background: var(--pq-green-pale);
}

.glossary-item:nth-child(even) {
    background: var(--pq-light-gold);
}

.glossary-item:hover {
    border-color: var(--pq-green);
}

.glossary-item-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.glossary-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: var(--pq-green-dark);
    direction: rtl;
}

.glossary-transliteration {
    font-weight: 600;
    color: var(--pq-green);
    font-size: 1.05rem;
}

.glossary-category-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: var(--pq-green);
    color: var(--pq-white);
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.glossary-definition {
    color: var(--pq-gray-700);
    line-height: 1.6;
}

/* ==========================================================================
   Content Pages (Calendar, Where to Begin, Recommended Path, Key Concepts)
   ========================================================================== */

.content-page-intro {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--pq-gray-700);
    line-height: 1.7;
}

.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.event-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
}

.event-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.event-card:nth-child(even) {
    background: var(--pq-light-gold);
}

.event-card-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: var(--pq-green-dark);
    direction: rtl;
    text-align: right;
    margin-bottom: 0.5rem;
}

.event-card-title {
    font-weight: 600;
    color: var(--pq-green);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.event-card-date {
    font-size: 0.85rem;
    color: var(--pq-gold);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.event-card-desc {
    font-size: 0.9rem;
    color: var(--pq-gray-700);
    line-height: 1.6;
}

.concept-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.concept-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    padding: 1.75rem;
    transition: border-color 0.2s;
}

.concept-card:hover {
    border-color: var(--pq-green);
}

.concept-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.concept-card:nth-child(even) {
    background: var(--pq-light-gold);
}

.concept-card-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.75rem;
    color: var(--pq-green-dark);
    direction: rtl;
    text-align: center;
    margin-bottom: 0.5rem;
}

.concept-card-title {
    font-weight: 600;
    color: var(--pq-green);
    font-size: 1.15rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.concept-card-desc {
    color: var(--pq-gray-700);
    line-height: 1.7;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.concept-card-refs {
    font-size: 0.8rem;
    color: var(--pq-gray-500);
}

.concept-card-refs a {
    color: var(--pq-gold);
    text-decoration: none;
}

.concept-card-refs a:hover {
    color: var(--pq-green);
}

.reading-path {
    max-width: 800px;
    margin: 0 auto;
}

.path-theme {
    margin-bottom: 2.5rem;
}

.path-theme-title {
    font-size: 1.2rem;
    color: var(--pq-green-dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pq-green-pale);
    margin-bottom: 1rem;
}

.path-items {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 3px solid var(--pq-green);
    padding-left: 1.5rem;
}

.path-item {
    position: relative;
    padding: 1rem 0;
    border-bottom: 1px solid var(--pq-gray-100);
}

.path-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 1.3rem;
    width: 10px;
    height: 10px;
    background: var(--pq-green);
    border-radius: 50%;
}

.path-item:nth-child(odd)::before {
    background: var(--pq-gold);
}

.path-item a {
    color: var(--pq-green);
    text-decoration: none;
    font-weight: 600;
}

.path-item a:hover {
    color: var(--pq-gold);
}

.path-item-desc {
    font-size: 0.9rem;
    color: var(--pq-gray-600);
    margin-top: 0.25rem;
}

/* Morphology Page */
.morphology-browse {
    background: var(--pq-cream);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.morphology-browse select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--pq-gray-300);
    border-radius: 6px;
    font-size: 1rem;
    margin-right: 0.75rem;
}

.morphology-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.morphology-stat-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.morphology-stat-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.morphology-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pq-green-dark);
}

.morphology-stat-label {
    font-size: 0.85rem;
    color: var(--pq-gray-600);
    margin-top: 0.25rem;
}

/* Cross-References Page */
.crossref-browse-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.crossref-browse-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.crossref-browse-card:hover {
    border-color: var(--pq-green);
    transform: translateY(-2px);
}

.crossref-browse-card:nth-child(odd) {
    background: var(--pq-green-pale);
}

.crossref-browse-card:nth-child(even) {
    background: var(--pq-light-gold);
}

.crossref-browse-card h3 {
    color: var(--pq-green-dark);
    margin-bottom: 0.5rem;
}

.crossref-lookup {
    background: var(--pq-cream);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.crossref-lookup input {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--pq-gray-300);
    border-radius: 8px;
    font-size: 1rem;
    width: 200px;
    margin-right: 0.75rem;
}

.crossref-lookup input:focus {
    outline: none;
    border-color: var(--pq-green);
}

.crossref-lookup button {
    padding: 0.75rem 1.5rem;
    background: var(--pq-green);
    color: var(--pq-white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.crossref-lookup button:hover {
    background: var(--pq-gold);
}

.network-viz-placeholder {
    background: var(--pq-gray-50);
    border: 2px dashed var(--pq-gray-300);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    color: var(--pq-gray-500);
    margin: 2rem 0;
    font-style: italic;
}

/* ==========================================================================
   Verse Page + Content Pages Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .verse-page-layout {
        grid-template-columns: 1fr;
    }

    .cross-ref-sidebar,
    .verse-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .names-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .names-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .translations-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .translation-filter-input {
        width: 100%;
    }

    .morphology-interlinear {
        gap: 0.75rem;
    }

    .morphology-word {
        min-width: 80px;
    }

    .prayer-step {
        flex-direction: column;
        align-items: flex-start;
    }

    .prayer-text-block .prayer-arabic {
        font-size: 1.25rem;
    }

    .concept-cards {
        grid-template-columns: 1fr;
    }

    .crossref-lookup input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .crossref-lookup button {
        width: 100%;
    }

    .crossref-browse-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .names-grid {
        grid-template-columns: 1fr;
    }

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

    .prayer-reference-table {
        font-size: 0.8rem;
    }

    .prayer-reference-table th,
    .prayer-reference-table td {
        padding: 0.5rem;
    }
}

/* =============================================
   Surah Page — Translation & Transliteration Previews
   ============================================= */
.ayah-translation-preview {
    font-size: 0.9rem;
    color: var(--pq-gray-700, #616161);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.ayah-transliteration-preview {
    font-size: 0.85rem;
    color: var(--pq-gray-500, #9E9E9E);
    font-style: italic;
    margin-top: 0.25rem;
}

/* =============================================
   Homepage — Extras (View As + Quick Links)
   ============================================= */
.homepage-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl, 2rem);
    margin: var(--space-2xl, 3rem) 0;
    align-items: start;
}

.homepage-quicklinks {
    background: var(--pq-cream, #FAF7F0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    border: 1px solid var(--pq-divider, #e0e0e0);
}

.homepage-quicklinks h3 {
    margin: 0 0 var(--space-md, 1rem);
    color: var(--pq-green-dark, #1B5E20);
    font-size: 1.125rem;
}

.quicklink-item {
    display: block;
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    margin-bottom: var(--space-xs, 0.25rem);
    color: var(--pq-charcoal, #333);
    text-decoration: none;
    border-radius: var(--radius-md, 8px);
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}

.quicklink-item:hover {
    background: var(--pq-green-pale, #e8f5e9);
    color: var(--pq-green-dark, #1B5E20);
}

@media (max-width: 768px) {
    .homepage-extras {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Verse Page — Top Navigation
   ============================================= */
.verse-nav-top {
    margin-bottom: var(--space-lg, 1.5rem);
    padding: var(--space-sm, 0.5rem) 0;
    border-bottom: 1px solid var(--pq-divider, #e0e0e0);
    font-size: 0.875rem;
}

/* =============================================
   Morphology — Transliteration Line
   ============================================= */
.morph-translit-spoken {
    font-size: 0.82rem;
    color: var(--pq-green, #2E7D32);
    font-weight: 500;
    margin-top: 0.25rem;
    margin-bottom: 0.15rem;
    letter-spacing: 0.01em;
}

.morph-transliteration {
    font-size: 0.72rem;
    font-style: italic;
    color: var(--pq-gray-500, #9E9E9E);
    margin-top: 0.1rem;
}

/* =============================================
   Root Words Sidebar — Transliteration
   ============================================= */
.root-transliteration {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--pq-gray-500, #9E9E9E);
    margin-left: 0.25rem;
}

/* =============================================
   Themes Sidebar
   ============================================= */
.themes-sidebar .theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs, 0.25rem);
}

.theme-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--pq-green-pale, #e8f5e9);
    color: var(--pq-green-dark, #1B5E20);
    border-radius: 999px;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: background 0.2s;
    font-weight: 500;
}

.theme-tag:hover {
    background: var(--pq-green, #2E7D32);
    color: #fff;
}

/* =============================================
   Surah Page — Two-Column Layout
   ============================================= */
.surah-page-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-xl, 2rem);
    align-items: start;
}

.surah-main-content {
    min-width: 0;
}

.surah-sidebar {
    position: sticky;
    top: var(--space-lg, 1.5rem);
    max-height: calc(100vh - var(--space-lg, 1.5rem) - 1rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--pq-gray-300, #ccc) transparent;
    padding-bottom: 1.5rem;
}
.surah-sidebar::-webkit-scrollbar {
    width: 5px;
}
.surah-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.surah-sidebar::-webkit-scrollbar-thumb {
    background: var(--pq-gray-300, #ccc);
    border-radius: 3px;
}
.surah-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--pq-gray-400, #999);
}

.surah-sidebar .viewas-card + .viewas-card {
    margin-top: var(--space-md, 1rem);
}

/* ---------- Ruku Section inline label (between ayah cards) ---------- */
.pq-ruku-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin: 0.75rem 0 0.25rem;
    background: var(--pq-green-pale, #e8f5e9);
    border-left: 3px solid var(--pq-green, #2e7d32);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8rem;
}

.pq-ruku-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pq-green-dark, #1b5e20);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.pq-ruku-section-name {
    color: var(--pq-green-dark, #1b5e20);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

/* ---------- Ruku Sections sidebar ---------- */
.pq-ruku-nav {
    max-height: 50vh;
    overflow-y: auto;
}

.pq-ruku-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: ruku;
}

.pq-ruku-list li {
    border-bottom: 1px solid var(--pq-gray-200);
}

.pq-ruku-list li:last-child {
    border-bottom: none;
}

.pq-ruku-link {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 8px var(--space-sm);
    text-decoration: none;
    color: var(--pq-gray-800);
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.pq-ruku-link:hover {
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
}

.pq-ruku-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--pq-green-dark);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 1px;
}

.pq-ruku-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pq-ruku-topic {
    font-weight: 500;
    color: var(--pq-gray-800);
    font-size: 0.85rem;
    line-height: 1.3;
}

.pq-ruku-range {
    color: var(--pq-gray-500);
    font-size: 0.75rem;
}

.pq-ruku-link:hover .pq-ruku-topic {
    color: var(--pq-green-dark);
}

.pq-ruku-link:hover .pq-ruku-range {
    color: var(--pq-green-dark);
}

@media (max-width: 1024px) {
    .surah-page-layout {
        grid-template-columns: 1fr;
    }

    .surah-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .pq-ruku-nav {
        max-height: none;
    }
}

/* =============================================
   Surah Page — Translation Selector
   ============================================= */
.translation-selector {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-lg, 1.5rem);
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--pq-cream, #FAF7F0);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--pq-divider, #e0e0e0);
    flex-wrap: wrap;
}

.translation-selector label {
    font-weight: 600;
    color: var(--pq-green-dark, #1B5E20);
    font-size: 0.875rem;
    white-space: nowrap;
}

.translation-selector select {
    flex: 1;
    min-width: 150px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.875rem;
    background: #fff;
}

.translation-reset {
    font-size: 0.8rem;
    color: var(--pq-gray-500, #9E9E9E);
    text-decoration: underline;
}

/* =============================================
   Surah Page — Restructured Ayah Card
   ============================================= */
.ayah-card-restructured .ayah-arabic {
    text-align: left;
}

.ayah-translator-name {
    font-size: 0.8rem;
    color: var(--pq-gray-500, #9E9E9E);
    font-style: italic;
    margin-top: 0.25rem;
}

/* =============================================
   Verse Info DL in Sidebar
   ============================================= */
.verse-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.verse-info-list dt {
    font-weight: 600;
    color: var(--pq-gray-600, #757575);
}

.verse-info-list dd {
    margin: 0;
    color: var(--pq-charcoal, #333);
}

/* ==========================================================================
   Five Pillars of Islam
   ========================================================================== */

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-xl, 2rem);
}

.pillar-card {
    display: block;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    text-align: center;
}

.pillar-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pillar-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--pq-green, #2E7D32);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--space-sm, 0.5rem);
}

.pillar-card-title {
    font-size: 1.25rem;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0.25rem 0;
}

.pillar-card-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--pq-gray-600, #757575);
    margin-bottom: var(--space-sm, 0.5rem);
}

.pillar-card-arabic {
    font-size: 1.5rem;
    line-height: 2;
    color: var(--pq-green-dark, #1B5E20);
}

.pillar-card-translit {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--pq-gray-600, #757575);
    margin-bottom: var(--space-sm, 0.5rem);
}

.pillar-card-desc {
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    line-height: 1.5;
}

/* Pillar detail page */
.pillar-detail-header {
    text-align: center;
    margin-bottom: var(--space-xl, 2rem);
    padding-bottom: var(--space-lg, 1.5rem);
    border-bottom: 1px solid var(--pq-divider, #e0e0e0);
}

.pillar-subtitle {
    font-weight: 400;
    color: var(--pq-gray-600, #757575);
    font-size: 0.85em;
}

.pillar-arabic {
    font-size: 2rem;
    line-height: 2.2;
    color: var(--pq-green-dark, #1B5E20);
    margin: var(--space-md, 1rem) 0 0.25rem;
}

.pillar-transliteration {
    font-size: 1rem;
    font-style: italic;
    color: var(--pq-gray-600, #757575);
}

.pillar-english {
    font-size: 1.1rem;
    color: var(--pq-charcoal, #2D2D2D);
    margin-top: 0.5rem;
}

.pillar-detail-body {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.75;
    font-size: 1rem;
    color: var(--pq-charcoal, #2D2D2D);
}

.pillar-quran-ref {
    border-left: 3px solid var(--pq-gold, #C49A2F);
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    margin: var(--space-lg, 1.5rem) 0;
    font-style: italic;
    color: var(--pq-gray-700, #616161);
    background: var(--pq-light-gold, #FFF8E1);
    border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
}

/* Pillar Key Verses Section
   ========================================================================== */

.pillar-verses-section {
    margin-top: var(--space-2xl, 2.5rem);
    border-top: 1px solid var(--pq-divider, #E0E0E0);
    padding-top: var(--space-xl, 2rem);
}

.pillar-verses-heading {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: var(--space-md, 1rem);
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
}

.pillar-verses-heading::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--pq-gold, #C49A2F);
    border-radius: 2px;
    flex-shrink: 0;
}

.pillar-verses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-sm, 0.5rem);
}

.pillar-verse-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #E0E0E0);
    border-radius: var(--radius-md, 6px);
    text-decoration: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.pillar-verse-item:hover {
    border-color: var(--pq-green, #2E7D32);
    background: var(--pq-green-pale, #e8f5e9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pillar-verse-ref {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--pq-green, #2E7D32);
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.01em;
}

.pillar-verse-note {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
    line-height: 1.4;
}

@media (max-width: 640px) {
    .pillar-verses-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Six Articles of Faith — Page Styles
   ========================================================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-xl, 2rem);
}

.article-card {
    display: block;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    text-align: center;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--pq-green, #2E7D32);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--space-sm, 0.5rem);
}

.article-card-title {
    font-size: 1.25rem;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0.25rem 0;
}

.article-card-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--pq-gray-600, #757575);
    margin-bottom: var(--space-sm, 0.5rem);
}

.article-card-arabic {
    font-size: 1.5rem;
    line-height: 2;
    color: var(--pq-green-dark, #1B5E20);
}

.article-card-translit {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--pq-gray-600, #757575);
    margin-bottom: var(--space-sm, 0.5rem);
}

.article-card-desc {
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    line-height: 1.5;
}

/* Article detail page */
.article-detail-header {
    text-align: center;
    margin-bottom: var(--space-xl, 2rem);
    padding-bottom: var(--space-lg, 1.5rem);
    border-bottom: 1px solid var(--pq-divider, #e0e0e0);
}

.article-subtitle {
    font-weight: 400;
    color: var(--pq-gray-600, #757575);
    font-size: 0.85em;
}

.article-arabic {
    font-size: 2rem;
    line-height: 2.2;
    color: var(--pq-green-dark, #1B5E20);
    margin: var(--space-md, 1rem) 0 0.25rem;
}

.article-transliteration {
    font-size: 1rem;
    font-style: italic;
    color: var(--pq-gray-600, #757575);
}

.article-english {
    font-size: 1.1rem;
    color: var(--pq-charcoal, #2D2D2D);
    margin-top: 0.5rem;
}

.article-detail-body {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.75;
    font-size: 1rem;
    color: var(--pq-charcoal, #2D2D2D);
}

.article-quran-ref {
    border-left: 3px solid var(--pq-gold, #C49A2F);
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    margin: var(--space-lg, 1.5rem) 0;
    font-style: italic;
    color: var(--pq-gray-700, #616161);
    background: var(--pq-light-gold, #FFF8E1);
    border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
}

/* Article Key Verses */
.article-verses-section {
    margin-top: var(--space-2xl, 2.5rem);
    border-top: 1px solid var(--pq-divider, #E0E0E0);
    padding-top: var(--space-xl, 2rem);
}

.article-verses-heading {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: var(--space-md, 1rem);
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
}

.article-verses-heading::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--pq-gold, #C49A2F);
    border-radius: 2px;
    flex-shrink: 0;
}

.article-verses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-sm, 0.5rem);
}

.article-verse-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #E0E0E0);
    border-radius: var(--radius-md, 6px);
    text-decoration: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.article-verse-item:hover {
    border-color: var(--pq-green, #2E7D32);
    background: var(--pq-green-pale, #e8f5e9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.article-verse-ref {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--pq-green, #2E7D32);
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.01em;
}

.article-verse-note {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
    line-height: 1.4;
}

@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
    .article-verses-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Women in Early Islam — Page Styles
   ========================================================================== */
.women-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-xl, 2rem);
}

.woman-card {
    display: block;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.woman-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.woman-card-name {
    font-size: 1.15rem;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0 0 0.25rem;
}

.woman-card-role {
    font-size: 0.85rem;
    color: var(--pq-green, #2E7D32);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.woman-card-meta {
    font-size: 0.8rem;
    color: var(--pq-gray-600, #757575);
    margin-bottom: var(--space-sm, 0.5rem);
}

.woman-card-contribution {
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    line-height: 1.5;
}

/* Woman detail page */
.woman-detail-header {
    text-align: center;
    margin-bottom: var(--space-xl, 2rem);
    padding-bottom: var(--space-lg, 1.5rem);
    border-bottom: 1px solid var(--pq-divider, #e0e0e0);
}

.woman-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-md, 1rem);
    flex-wrap: wrap;
    margin-top: var(--space-sm, 0.5rem);
    font-size: 0.9rem;
    color: var(--pq-gray-600, #757575);
}

.woman-role {
    color: var(--pq-green, #2E7D32);
    font-weight: 600;
}

.woman-detail-body {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.75;
    font-size: 1rem;
    color: var(--pq-charcoal, #2D2D2D);
}

.woman-highlight {
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--pq-green-pale, #e8f5e9);
    border-radius: var(--radius-md, 6px);
    margin-bottom: var(--space-lg, 1.5rem);
    line-height: 1.6;
}

.woman-detail-text p {
    margin-bottom: 1em;
}

.woman-cross-link {
    margin-top: var(--space-lg, 1.5rem);
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--pq-light-gold, #FFF8E1);
    border-left: 3px solid var(--pq-gold, #C49A2F);
    border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
}

.woman-cross-link a {
    color: var(--pq-green, #2E7D32);
    font-weight: 500;
}

@media (max-width: 640px) {
    .women-grid { grid-template-columns: 1fr; }
    .woman-meta { flex-direction: column; align-items: center; gap: 0.25rem; }
}

/* ==========================================================================
   See Also Cards (shared by Five Pillars, Six Articles, Women pages)
   ========================================================================== */
.see-also {
    border-top: 1px solid var(--pq-divider, #e0e0e0);
    padding-top: var(--space-lg, 1.5rem);
}

.see-also-heading {
    font-size: 1.1rem;
    color: var(--pq-gray-700, #616161);
    margin-bottom: var(--space-md, 1rem);
}

.see-also-card {
    display: block;
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-md, 6px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.see-also-card:hover {
    border-color: var(--pq-green, #2E7D32);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}

.see-also-card-title {
    display: block;
    font-weight: 600;
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: 0.15rem;
}

.see-also-card-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--pq-gray-600, #757575);
}

/* ==========================================================================
   Cross-References Page — New Sections
   ========================================================================== */

/* Section heading shared by Tafsir Sources + Thematic Index */
.crossref-section-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: var(--space-md, 1rem);
    padding-bottom: var(--space-sm, 0.5rem);
    border-bottom: 2px solid var(--pq-divider, #E0E0E0);
}

/* Tafsir source cards grid */
.crossref-tafsir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md, 1rem);
    margin-top: var(--space-md, 1rem);
}

.crossref-tafsir-card {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #E0E0E0);
    border-radius: var(--radius-md, 6px);
    padding: var(--space-md, 1rem);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crossref-tafsir-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--pq-charcoal, #2D2D2D);
    line-height: 1.3;
}

.crossref-tafsir-author {
    font-size: 0.8125rem;
    color: var(--pq-gray-700, #616161);
}

.crossref-tafsir-date {
    color: var(--pq-gray-500, #9E9E9E);
    font-size: 0.8125rem;
    margin-left: 2px;
}

.crossref-tafsir-method {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.crossref-tafsir-desc {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
    line-height: 1.5;
    margin: 4px 0 0;
}

/* Thematic Index */
.crossref-theme-letter-group {
    margin-bottom: var(--space-lg, 1.5rem);
}

.crossref-theme-letter {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: var(--space-sm, 0.5rem);
    padding-left: var(--space-xs, 0.25rem);
    border-left: 3px solid var(--pq-gold, #C49A2F);
}

.crossref-theme-tags {
    margin-top: 0;
}

.crossref-term-count {
    font-size: 0.7rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-left: 2px;
    font-weight: 400;
}

/* Alpha jump-nav link */
.crossref-alpha-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 4px;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #E0E0E0);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.crossref-alpha-link:hover {
    background: var(--pq-green, #2E7D32);
    border-color: var(--pq-green, #2E7D32);
    color: #fff;
}

/* Responsive: stack tafsir grid on small screens */
@media (max-width: 640px) {
    .crossref-tafsir-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Muslim Scientists
   ========================================================================== */

.scientists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-xl, 2rem);
}

.scientist-card {
    display: block;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.scientist-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.scientist-card-name {
    font-size: 1.1rem;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0 0 0.25rem;
}

.scientist-card-meta {
    font-size: 0.8rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-bottom: 0.5rem;
}

.scientist-card-field {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
    background: var(--pq-green-pale, #E8F5E9);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.scientist-card-contribution {
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.scientist-card-preceded {
    font-size: 0.8rem;
    color: var(--pq-gold-dark, #C5A55A);
    font-style: italic;
    margin: 0;
}

/* Scientist detail page */
.scientist-detail-header {
    margin-bottom: var(--space-xl, 2rem);
    padding-bottom: var(--space-lg, 1.5rem);
    border-bottom: 1px solid var(--pq-divider, #e0e0e0);
}

.scientist-detail-header h1 {
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: 0.5rem;
}

.scientist-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    font-size: 0.9rem;
    color: var(--pq-gray-600, #757575);
}

.scientist-meta span::after {
    content: ' · ';
    color: var(--pq-gray-400, #BDBDBD);
}

.scientist-meta span:last-child::after {
    content: '';
}

.scientist-detail-body {
    max-width: 720px;
    line-height: 1.75;
    color: var(--pq-charcoal, #2D2D2D);
}

.scientist-highlight {
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    margin-bottom: var(--space-md, 1rem);
    border-radius: var(--radius-md, 8px);
    background: var(--pq-green-pale, #E8F5E9);
    font-size: 0.95rem;
}

.scientist-preceded {
    background: var(--pq-light-gold, #FFF8E1);
}

/* ==========================================================================
   Vocabulary Builder
   ========================================================================== */

.vocab-age-selector {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm, 0.5rem);
    justify-content: center;
    margin-bottom: var(--space-xl, 2rem);
}

.vocab-age-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--pq-green, #2E7D32);
    border-radius: 999px;
    color: var(--pq-green, #2E7D32);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.vocab-age-btn:hover,
.vocab-age-btn.active {
    background: var(--pq-green, #2E7D32);
    color: #fff;
}

.vocab-age-clear {
    border-color: var(--pq-gray-400, #BDBDBD);
    color: var(--pq-gray-600, #757575);
}

.vocab-age-clear:hover {
    background: var(--pq-gray-400, #BDBDBD);
    color: #fff;
}

.vocab-group {
    margin-bottom: var(--space-xl, 2rem);
}

.vocab-group-title {
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: 0.25rem;
}

.vocab-group-desc {
    color: var(--pq-gray-600, #757575);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg, 1.5rem);
}

.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md, 1rem);
}

.vocab-card {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-md, 1rem);
    text-align: center;
}

.vocab-arabic {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.75rem;
    line-height: 2;
    direction: rtl;
    color: var(--pq-green-dark, #1B5E20);
}

.vocab-translit {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--pq-gray-600, #757575);
    margin-bottom: 0.25rem;
}

.vocab-english {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pq-charcoal, #2D2D2D);
    margin-bottom: 0.25rem;
}

.vocab-context {
    font-size: 0.8rem;
    color: var(--pq-gray-500, #9E9E9E);
    line-height: 1.4;
}

/* ==========================================================================
   Comprehension Quizzes
   ========================================================================== */

/* Student bar */
.quiz-student-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-lg, 1.5rem);
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--pq-cream, #FAF7F0);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--pq-divider, #e0e0e0);
    flex-wrap: wrap;
}

.quiz-student-bar label {
    font-weight: 600;
    color: var(--pq-green-dark, #1B5E20);
    font-size: 0.875rem;
}

.quiz-student-bar select {
    flex: 1;
    min-width: 120px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.875rem;
    background: #fff;
}

/* Quiz grid / list */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
}

.quiz-card {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    text-align: center;
}

.quiz-card-title {
    color: var(--pq-green-dark, #1B5E20);
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.quiz-card-desc {
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    margin-bottom: 0.5rem;
}

.quiz-card-meta {
    font-size: 0.8rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-bottom: 0.75rem;
}

.quiz-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.quiz-badge-pass {
    background: var(--pq-green-pale, #E8F5E9);
    color: var(--pq-green-dark, #1B5E20);
}

.quiz-badge-fail {
    background: #FFF3E0;
    color: #E65100;
}

.quiz-start-btn {
    margin-bottom: 0.5rem;
}

.quiz-cert-btn {
    display: block;
    margin: 0 auto;
}

/* Quiz container */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl, 2rem);
}

.quiz-header {
    margin-bottom: var(--space-lg, 1.5rem);
}

.quiz-header h2 {
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: 0.5rem;
}

.quiz-progress {
    font-size: 0.85rem;
    color: var(--pq-gray-600, #757575);
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--pq-gray-200, #EEEEEE);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--pq-green, #2E7D32);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pq-charcoal, #2D2D2D);
    margin-bottom: var(--space-lg, 1.5rem);
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-lg, 1.5rem);
}

.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 2px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    background: var(--pq-white, #fff);
    font-size: 0.95rem;
    color: var(--pq-charcoal, #2D2D2D);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.quiz-option:hover {
    border-color: var(--pq-green-light, #4CAF50);
    background: var(--pq-green-pale, #E8F5E9);
}

.quiz-option.selected {
    border-color: var(--pq-green, #2E7D32);
    background: var(--pq-green-pale, #E8F5E9);
    font-weight: 600;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
}

/* Quiz results */
.quiz-results {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-score-display {
    text-align: center;
    margin: var(--space-lg, 1.5rem) 0;
}

.quiz-score-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
}

.quiz-score-label {
    font-size: 1rem;
    color: var(--pq-gray-600, #757575);
}

.quiz-results-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md, 1rem);
    margin: var(--space-lg, 1.5rem) 0;
}

.quiz-review-item {
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    border-radius: var(--radius-sm, 4px);
    margin-bottom: var(--space-sm, 0.5rem);
    font-size: 0.9rem;
    line-height: 1.6;
}

.quiz-review-item.correct {
    background: var(--pq-green-pale, #E8F5E9);
}

.quiz-review-item.incorrect {
    background: #FFF3E0;
}

.quiz-review-your {
    color: var(--pq-charcoal, #2D2D2D);
}

.quiz-review-correct {
    color: var(--pq-green, #2E7D32);
    font-weight: 600;
}

/* Quiz certificate */
.quiz-certificate {
    max-width: 700px;
    margin: 0 auto;
}

.certificate-inner {
    background: var(--pq-white, #fff);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
}

.certificate-border {
    border: 4px double var(--pq-gold, #C49A2F);
    margin: var(--space-md, 1rem);
    padding: var(--space-xl, 2rem);
    text-align: center;
    border-radius: var(--radius-md, 8px);
}

.certificate-header h2 {
    font-size: 1.75rem;
    color: var(--pq-gold-dark, #C5A55A);
    margin-bottom: 0.25rem;
}

.certificate-brand {
    color: var(--pq-green, #2E7D32);
    font-weight: 600;
    font-size: 0.9rem;
}

.certificate-body {
    margin: var(--space-xl, 2rem) 0;
    line-height: 1.8;
    color: var(--pq-charcoal, #2D2D2D);
}

.certificate-name {
    font-size: 1.75rem;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0.5rem 0;
    text-decoration: underline;
    text-decoration-color: var(--pq-gold, #C49A2F);
    text-underline-offset: 6px;
}

.certificate-quiz {
    font-size: 1.25rem;
    color: var(--pq-charcoal, #2D2D2D);
    margin: 0.5rem 0;
}

.certificate-footer {
    margin-top: var(--space-lg, 1.5rem);
    font-size: 0.9rem;
    color: var(--pq-gray-600, #757575);
    border-top: 1px solid var(--pq-divider, #e0e0e0);
    padding-top: var(--space-md, 1rem);
}

.certificate-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md, 1rem);
    margin-top: var(--space-lg, 1.5rem);
}

/* Print styles for certificate — scoped to pages that contain one */
@media print {
    body.pq-has-certificate * {
        visibility: hidden;
    }

    body.pq-has-certificate .quiz-certificate,
    body.pq-has-certificate .quiz-certificate * {
        visibility: visible;
    }

    body.pq-has-certificate .quiz-certificate {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .no-print {
        display: none !important;
    }
}

/* ==========================================================================
   Shared: .btn-sm, .btn-primary (ensure consistency)
   ========================================================================== */

.btn-sm {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-sm, 4px);
    color: var(--pq-green, #2E7D32);
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-sm:hover {
    background: var(--pq-green-pale, #E8F5E9);
}

.btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--pq-green, #2E7D32);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--pq-green-dark, #1B5E20);
}

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

.breadcrumb a {
    color: var(--pq-green, #2E7D32);
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Page subtitle (shared)
   ========================================================================== */

.page-subtitle {
    color: var(--pq-gray-600, #757575);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Translator Surah Page
   ========================================================================== */

.translator-surah-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl, 2rem);
    padding: var(--space-xl, 2rem) 0;
}

@media (max-width: 768px) {
    .translator-surah-layout {
        grid-template-columns: 1fr;
    }
}

.translator-main-content {
    min-width: 0;
}

.translator-sidebar .sidebar-section {
    background: var(--pq-cream, #FFF8E1);
    border-radius: 12px;
    padding: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-md, 1rem);
}

.translator-sidebar .sidebar-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-gray-600, #757575);
    margin-bottom: var(--space-sm, 0.75rem);
}

.translator-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.translator-list li {
    padding: 6px 0;
    font-size: 0.9375rem;
}

.translator-list li.active {
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
}

.translator-list li a {
    color: var(--pq-gray-700, #616161);
    text-decoration: none;
}

.translator-list li a:hover {
    color: var(--pq-green, #2E7D32);
    text-decoration: underline;
}

/* Translator ayah cards */
.translator-ayah-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 1rem);
}

.translator-ayah-card {
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 12px;
    padding: var(--space-lg, 1.5rem);
    transition: box-shadow 0.2s;
}

.translator-ayah-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.translator-ayah-ref {
    margin-bottom: var(--space-sm, 0.75rem);
}

.translator-ayah-ref a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
    text-decoration: none;
    background: var(--pq-cream, #FFF8E1);
    padding: 2px 10px;
    border-radius: 100px;
}

.translator-ayah-ref a:hover {
    background: var(--pq-green, #2E7D32);
    color: #fff;
}

.translator-ayah-arabic {
    font-size: 1.5rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
    margin-bottom: var(--space-sm, 0.75rem);
    padding-bottom: var(--space-sm, 0.75rem);
    border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
}

.translator-ayah-translit {
    font-size: 0.875rem;
    color: var(--pq-gray-500, #9E9E9E);
    font-style: italic;
    margin-bottom: var(--space-xs, 0.5rem);
}

.translator-ayah-translation {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--pq-gray-800, #424242);
}

/* Translator link in single-ayah */
.translator-link {
    color: var(--pq-green, #2E7D32);
    text-decoration: none;
    font-weight: inherit;
}

.translator-link:hover {
    text-decoration: underline;
}

/* Translator box list — scrollable list inside viewas-card */
.pq-translator-box-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
}
.pq-translator-box-list::-webkit-scrollbar {
    width: 6px;
}
.pq-translator-box-list::-webkit-scrollbar-track {
    background: transparent;
}
.pq-translator-box-list::-webkit-scrollbar-thumb {
    background: var(--pq-gray-300, #ccc);
    border-radius: 3px;
}
.pq-translator-box-item {
    border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
}
.pq-translator-box-item:last-child {
    border-bottom: none;
}
.pq-translator-box-item a,
.pq-translator-box-item span {
    display: block;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: var(--pq-gray-700, #616161);
    text-decoration: none;
    transition: background 0.15s;
}
.pq-translator-box-item a:hover {
    background: var(--pq-cream, #faf8f3);
    color: var(--pq-green, #2E7D32);
}
.pq-translator-box-item.active {
    background: var(--pq-green, #2E7D32);
}
.pq-translator-box-item.active span {
    color: #fff;
    font-weight: 600;
}

/* ==========================================================================
   Hadith Grading Panel
   ========================================================================== */

.grading-panel {
    margin-top: var(--space-lg, 1.5rem);
    padding-top: var(--space-lg, 1.5rem);
    border-top: 1px solid var(--pq-gray-200, #E0E0E0);
    text-align: left;
}

.grading-panel-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-gray-500, #9E9E9E);
    margin-bottom: var(--space-sm, 0.75rem);
}

.grading-cards {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm, 0.75rem);
}

.grading-card {
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 10px;
    padding: var(--space-sm, 0.75rem) var(--space-md, 1rem);
    min-width: 140px;
    flex: 1;
}

.grading-card-scholar {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-gray-700, #616161);
    margin-bottom: 4px;
}

.grade-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.grade-companion {
    background: #1B5E20;
    color: #E8F5E9;
}

.grade-sahih {
    background: #E8F5E9;
    color: #2E7D32;
}

.grade-hasan {
    background: #FFF3E0;
    color: #E65100;
}

.grade-daif {
    background: #FFEBEE;
    color: #C62828;
}

.grade-mawdu {
    background: #4A0000;
    color: #FFCDD2;
}

.grade-unknown {
    background: var(--pq-gray-100, #F5F5F5);
    color: var(--pq-gray-500, #9E9E9E);
}

/* Gender accent borders */
.gender-male {
    border-left: 3px solid #2196F3 !important;
}
.gender-female {
    border-left: 3px solid #E91E63 !important;
}

/* ==========================================================================
   Theme Archive Page
   ========================================================================== */

.theme-archive-layout {
    max-width: var(--container-narrow, 800px);
    margin: 0 auto;
    padding: var(--space-xl, 2rem) var(--space-md, 1rem);
}

.theme-section {
    margin-bottom: var(--space-xl, 2rem);
}

.theme-section h2 {
    font-size: 1.125rem;
    color: var(--pq-gray-700, #616161);
    margin-bottom: var(--space-md, 1rem);
    padding-bottom: var(--space-xs, 0.5rem);
    border-bottom: 2px solid var(--pq-cream, #FFF8E1);
}

.theme-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.75rem);
}

.theme-item-card {
    display: block;
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 10px;
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.theme-item-card:hover {
    border-color: var(--pq-green, #2E7D32);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.theme-item-card .verse-ref {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
}

.theme-item-card .verse-preview {
    font-size: 0.9375rem;
    color: var(--pq-gray-700, #616161);
    margin-top: 4px;
    line-height: 1.6;
}

.theme-empty {
    text-align: center;
    padding: var(--space-xl, 2rem);
    color: var(--pq-gray-400, #BDBDBD);
    font-style: italic;
}

/* Theme tags (shared — sidebar + archive) */
.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.theme-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--pq-cream, #FFF8E1);
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    color: var(--pq-green-dark, #1B5E20);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.theme-tag:hover {
    background: var(--pq-green, #2E7D32);
    color: #fff;
    border-color: var(--pq-green, #2E7D32);
}

/* Themes sidebar section */
.themes-sidebar .theme-tags {
    margin-top: var(--space-xs, 0.5rem);
}

/* ==========================================================================
   Student Management Panel
   ========================================================================== */

.student-management {
    margin-bottom: var(--space-lg, 1.5rem);
}

.student-mgmt-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pq-cream, #FFF8E1);
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pq-gray-700, #616161);
    cursor: pointer;
    transition: background 0.2s;
}

.student-mgmt-toggle:hover {
    background: var(--pq-gray-100, #F5F5F5);
}

.mgmt-arrow {
    font-size: 0.625rem;
}

.student-mgmt-panel {
    margin-top: var(--space-sm, 0.75rem);
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 12px;
    padding: var(--space-md, 1rem);
}

.student-mgmt-empty {
    color: var(--pq-gray-400, #BDBDBD);
    font-style: italic;
    text-align: center;
    padding: var(--space-md, 1rem) 0;
    margin: 0;
}

.student-mgmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.student-mgmt-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--pq-gray-200, #E0E0E0);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-gray-500, #9E9E9E);
}

.student-mgmt-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
    vertical-align: middle;
}

.student-mgmt-name {
    font-weight: 600;
    color: var(--pq-charcoal, #212121);
}

.student-mgmt-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    background: #fff;
    color: var(--pq-gray-700, #616161);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-xs:hover {
    background: var(--pq-gray-100, #F5F5F5);
}

.btn-xs.btn-danger,
.btn-sm.btn-danger {
    color: #C62828;
    border-color: #FFCDD2;
}

.btn-xs.btn-danger:hover,
.btn-sm.btn-danger:hover {
    background: #FFEBEE;
    border-color: #C62828;
}

.student-mgmt-actions {
    margin-top: var(--space-md, 1rem);
    padding-top: var(--space-sm, 0.75rem);
    border-top: 1px solid var(--pq-gray-100, #F5F5F5);
    text-align: right;
}

/* ============================================================
   Batch 3 — Narrator Network
   ============================================================ */

.narrator-network-page {
    padding: 2rem 0 3rem;
}

.narrator-search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.narrator-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.narrator-search-input:focus {
    outline: none;
    border-color: var(--pq-primary, #1B5E20);
}

.narrator-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}

.narrator-sr-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
}

.narrator-sr-item:hover {
    background: var(--pq-gray-50, #FAFAFA);
}

.narrator-sr-item .arabic-text {
    margin-left: 0.5rem;
    color: var(--pq-gray-500, #9E9E9E);
}

.narrator-sr-empty {
    padding: 1rem;
    text-align: center;
    color: var(--pq-gray-500, #9E9E9E);
}

.narrator-network-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.narrator-network-canvas {
    width: 100%;
    height: 550px;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
    background: #f8fafc;
}

.narrator-network-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--pq-gray-500, #9E9E9E);
    font-size: 1.05rem;
}

.narrator-network-legend {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--pq-gray-600, #757575);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-trustworthy { background: #22c55e; }
.legend-acceptable  { background: #eab308; }
.legend-weak        { background: #ef4444; }
.legend-unknown     { background: #94a3b8; }

.narrator-profile-panel {
    position: relative;
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
    padding: 1.25rem;
}

.narrator-profile-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pq-gray-500, #9E9E9E);
    line-height: 1;
}

.narrator-profile-name {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.narrator-profile-arabic {
    font-size: 1.3rem;
    color: var(--pq-primary, #1B5E20);
    margin: 0 0 0.75rem;
}

.narrator-profile-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.narrator-profile-details dt {
    font-weight: 600;
    color: var(--pq-gray-600, #757575);
}

.narrator-profile-bio {
    font-size: 0.9rem;
    color: var(--pq-gray-700, #616161);
    line-height: 1.5;
}

.narrator-profile-hadith-count {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-primary, #1B5E20);
}

/* ============================================================
   Batch 3 — Hadith Topics
   ============================================================ */

.hadith-topics-page {
    padding: 2rem 0 3rem;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.topic-card:hover {
    border-color: var(--pq-primary, #1B5E20);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.topic-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--pq-primary, #1B5E20);
}

.topic-card-desc {
    font-size: 0.85rem;
    color: var(--pq-gray-600, #757575);
    margin: 0 0 auto;
    line-height: 1.4;
}

.topic-card-count {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pq-gray-500, #9E9E9E);
}

/* Topic archive layout */
.hadith-topic-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    padding: 2rem 0 3rem;
    align-items: start;
}

.topic-result-count {
    font-size: 0.9rem;
    color: var(--pq-gray-600, #757575);
    margin-bottom: 1rem;
}

.hadith-topic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hadith-topic-card {
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.hadith-topic-card:nth-child(even) {
    background: var(--pq-gray-50, #FAFAFA);
}

.hadith-topic-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hadith-topic-card-title {
    margin: 0;
    font-size: 1rem;
}

.hadith-topic-card-title a {
    color: var(--pq-primary, #1B5E20);
    text-decoration: none;
}

.hadith-topic-card-title a:hover {
    text-decoration: underline;
}

.hadith-grade-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: var(--pq-gray-100, #F5F5F5);
    color: var(--pq-gray-700, #616161);
}

.hadith-grade-badge.grade-companion { background: #1B5E20; color: #E8F5E9; }
.hadith-grade-badge.grade-sahih { background: #dcfce7; color: #166534; }
.hadith-grade-badge.grade-hasan { background: #fef9c3; color: #854d0e; }
.hadith-grade-badge.grade-daif  { background: #fee2e2; color: #991b1b; }
.hadith-grade-badge.grade-mawdu { background: #4A0000; color: #FFCDD2; }

.hadith-topic-card-collection {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--pq-gray-500, #9E9E9E);
}

.hadith-topic-card-preview {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--pq-gray-700, #616161);
}

/* Topic sidebar nav */
.topic-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.topic-nav-list li {
    border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
}

.topic-nav-list li:last-child {
    border-bottom: none;
}

.topic-nav-list a {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--pq-gray-700, #616161);
    text-decoration: none;
}

.topic-nav-list a:hover {
    color: var(--pq-primary, #1B5E20);
}

.topic-nav-list li.current a {
    font-weight: 600;
    color: var(--pq-primary, #1B5E20);
}

.topic-nav-count {
    color: var(--pq-gray-400, #BDBDBD);
    font-size: 0.8rem;
}

/* ============================================================
   Batch 3 — Responsive overrides
   ============================================================ */

@media (max-width: 768px) {
    .narrator-network-layout {
        grid-template-columns: 1fr;
    }
    .narrator-network-canvas {
        height: 400px;
    }
    .narrator-profile-panel {
        order: -1;
    }
    .hadith-topic-layout {
        grid-template-columns: 1fr;
    }
    .hadith-topic-sidebar {
        order: -1;
    }
    .topic-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* =============================================
   Translation Source Label (page-surah.php)
   ============================================= */
.translation-source-label {
    display: block;
    font-size: 0.75rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-top: var(--space-xs, 0.25rem);
    font-style: italic;
}

/* =============================================
   Surah Translation Selector — always visible
   ============================================= */
.surah-translation-selector {
    display: block !important;
    visibility: visible !important;
}

.surah-translation-selector select {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--pq-divider, #D4D1CA);
    font-size: 0.875rem;
    background: var(--pq-white, #fff);
    color: var(--pq-charcoal, #2D2D2D);
    cursor: pointer;
    min-width: 200px;
}

.surah-translation-selector select:focus {
    outline: 2px solid var(--pq-green, #2E7D32);
    outline-offset: 2px;
    border-color: var(--pq-green, #2E7D32);
}

/* =============================================
   Theme Tag — Upcoming Event Variant
   ============================================= */
.theme-tag--upcoming {
    background: var(--pq-light-gold, #FFF8E1);
    color: var(--pq-gold-dark, #C5A55A);
    border-color: var(--pq-gold, #C49A2F);
    font-weight: 600;
}

.theme-tag--upcoming:hover {
    background: var(--pq-gold, #C49A2F);
    color: var(--pq-white, #fff);
}

/* =============================================
   Year Switcher (Islamic Calendar)
   ============================================= */
.hijri-year-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md, 1rem);
    margin: var(--space-lg, 1.5rem) 0;
}

.hijri-year-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pq-green-pale, #E8F5E9);
    color: var(--pq-green-dark, #1B5E20);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    transition: var(--transition-fast, 150ms ease);
    border: 1px solid var(--pq-divider, #D4D1CA);
}

.hijri-year-switcher a:hover {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
    border-color: var(--pq-green, #2E7D32);
}

.hijri-year-switcher .current-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    min-width: 100px;
    text-align: center;
}

/* =============================================
   Zakah Calculator
   ============================================= */
.zakah-calculator {
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl, 2rem);
    margin: var(--space-2xl, 3rem) 0;
}

.zakah-calculator h3 {
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: var(--space-lg, 1.5rem);
}

.zakah-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
    margin-bottom: var(--space-md, 1rem);
}

.zakah-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pq-gray-700, #616161);
}

.zakah-field input {
    padding: 0.625rem 1rem;
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
    font-size: 1rem;
    color: var(--pq-charcoal, #2D2D2D);
    background: var(--pq-white, #fff);
    transition: var(--transition-fast, 150ms ease);
}

.zakah-field input:focus {
    outline: 2px solid var(--pq-green, #2E7D32);
    outline-offset: 2px;
    border-color: var(--pq-green, #2E7D32);
}

.zakah-result {
    background: var(--pq-green-pale, #E8F5E9);
    border: 2px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-lg, 1.5rem);
    text-align: center;
    margin-top: var(--space-lg, 1.5rem);
}

.zakah-result .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
}

.zakah-result .label {
    font-size: 0.875rem;
    color: var(--pq-gray-600, #757575);
    margin-top: var(--space-xs, 0.25rem);
}

/* =============================================
   Quiz Mode (Vocabulary Builder)
   ============================================= */
.quiz-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md, 8px);
    background: var(--pq-green-pale, #E8F5E9);
    color: var(--pq-green-dark, #1B5E20);
    border: 1px solid var(--pq-green, #2E7D32);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast, 150ms ease);
}

.quiz-mode-toggle:hover,
.quiz-mode-toggle.active {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
}

.quiz-mode-progress {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
    margin-left: var(--space-md, 1rem);
}

body.pq-quiz-mode .vocab-english {
    position: relative;
    color: transparent;
    cursor: pointer;
    user-select: none;
    background: var(--pq-green-pale, #E8F5E9);
    border-radius: var(--radius-sm, 4px);
    min-height: 1.5em;
}

body.pq-quiz-mode .vocab-english::after {
    content: 'Tap to reveal';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pq-gray-500, #9E9E9E);
    font-size: 0.8125rem;
    font-style: italic;
}

body.pq-quiz-mode .vocab-english.revealed {
    color: inherit;
    background: var(--pq-light-gold, #FFF8E1);
    cursor: default;
}

body.pq-quiz-mode .vocab-english.revealed::after {
    display: none;
}

/* =============================================
   Numeric Ayah URL Navigation
   ============================================= */
.verse-nav a[href*="/ayah/"] {
    transition: var(--transition-fast, 150ms ease);
}

/* =============================================
   AUDIT IMPLEMENTATION — New Pages CSS
   ============================================= */

/* --- Chain Analysis Page --- */
.chain-search-wrap { position: relative; max-width: 500px; margin-bottom: 1.5rem; }
.chain-search-wrap input { width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--pq-gray-200, #E0E0E0); border-radius: var(--radius-md, 8px); font-size: 1rem; transition: border-color 0.2s; }
.chain-search-wrap input:focus { border-color: var(--pq-green, #2E7D32); outline: none; }
.chain-results-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 100; max-height: 300px; overflow-y: auto; }
.chain-results-dropdown .chain-result-item { padding: 0.75rem 1rem; cursor: pointer; border-bottom: 1px solid var(--pq-gray-100, #F5F5F5); }
.chain-results-dropdown .chain-result-item:hover { background: var(--pq-green-pale, #E8F5E9); }
.chain-narrator-card { background: var(--pq-green-pale); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1.5rem; border-left: 4px solid var(--pq-green); }
.chain-narrator-card h3 { margin: 0 0 0.5rem; color: var(--pq-green-dark, #1B5E20); }
.chain-narrator-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; color: var(--pq-gray-600); }
.chain-table { width: 100%; border-collapse: collapse; }
.chain-table th { text-align: left; padding: 0.75rem; background: var(--pq-gray-50, #FAFAFA); border-bottom: 2px solid var(--pq-gray-200); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }
.chain-table td { padding: 0.75rem; border-bottom: 1px solid var(--pq-gray-100); vertical-align: top; }
.chain-path { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.chain-path .chain-node { background: var(--pq-gray-100); padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.8125rem; }
.chain-path .chain-arrow { color: var(--pq-gray-400); font-size: 0.75rem; }

/* --- Narrator Profiles Page --- */
.narrator-alpha-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1.5rem; }
.narrator-alpha-nav a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 4px; font-size: 0.8125rem; font-weight: 600; color: var(--pq-gray-600); text-decoration: none; transition: all 0.15s; }
.narrator-alpha-nav a:hover, .narrator-alpha-nav a.active { background: var(--pq-green); color: #fff; }
.narrator-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.narrator-card { background: #fff; border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); padding: 1.25rem; transition: box-shadow 0.2s, border-color 0.2s; }
.narrator-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: var(--pq-green); }
.narrator-card .narrator-name { font-weight: 600; color: var(--pq-text-primary, #1B1B1B); margin-bottom: 0.25rem; }
.narrator-card .narrator-arabic { font-family: 'Amiri', serif; font-size: 1.125rem; color: var(--pq-gray-600); margin-bottom: 0.5rem; }
.narrator-card .narrator-meta-row { display: flex; gap: 0.75rem; font-size: 0.8125rem; color: var(--pq-gray-500); margin-bottom: 0.5rem; }
.narrator-card .narrator-bio { font-size: 0.875rem; color: var(--pq-gray-600); line-height: 1.5; }

/* --- Grading Lens Page --- */
.grade-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.grade-pill { padding: 0.5rem 1rem; border: 2px solid var(--pq-gray-200); border-radius: 999px; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.15s; background: #fff; }
.grade-pill:hover { border-color: var(--pq-green); }
.grade-pill.active { background: var(--pq-green); color: #fff; border-color: var(--pq-green); }
.grade-pill.active-sahih { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.grade-pill.active-hasan { background: #F9A825; border-color: #F9A825; color: #fff; }
.grade-pill.active-daif { background: #E65100; border-color: #E65100; color: #fff; }
.grade-pill.active-mawdu { background: #C62828; border-color: #C62828; color: #fff; }
.grading-table { width: 100%; border-collapse: collapse; }
.grading-table th { text-align: left; padding: 0.625rem 0.75rem; background: var(--pq-gray-50); border-bottom: 2px solid var(--pq-gray-200); font-size: 0.8125rem; }
.grading-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--pq-gray-100); }
.grade-badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.grade-badge.grade-companion { background: #1B5E20; color: #E8F5E9; }
.grade-badge.grade-sahih { background: #E8F5E9; color: #2E7D32; }
.grade-badge.grade-hasan { background: #FFF8E1; color: #F57F17; }
.grade-badge.grade-daif { background: #FBE9E7; color: #E65100; }
.grade-badge.grade-mawdu { background: #4A0000; color: #FFCDD2; }
.grade-badge.grade-unknown { background: var(--pq-gray-100); color: var(--pq-gray-500); }

/* --- Tabaqah (generation) badges --- */
/* Companion = deep green (matches grade-companion). Followers, Successors, and
   Late Successors fan out across a coherent green-to-amber-to-slate palette to
   make chronological position scannable at a glance. */
.tabaqah-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    white-space: nowrap;
}
.tabaqah-badge.tabaqah-bucket-companion { background: #1B5E20; color: #E8F5E9; }
.tabaqah-badge.tabaqah-bucket-follower  { background: #E8F5E9; color: #1B5E20; border-color: #C8E6C9; }
.tabaqah-badge.tabaqah-bucket-successor { background: #FFF8E1; color: #6D4C00; border-color: #FFECB3; }
.tabaqah-badge.tabaqah-bucket-later     { background: #ECEFF1; color: #455A64; border-color: #CFD8DC; }
.tabaqah-badge.tabaqah-bucket-unknown   { background: var(--pq-gray-100); color: var(--pq-gray-500); }

/* Per-tier shading: each of the 12 tiers gets its own border-left accent so
   adjacent generations are distinguishable while staying within the bucket
   color family. Bucket sets the fill; tier sets the accent stripe. */
.tabaqah-badge.tabaqah-tier-1  { border-left: 3px solid #0D3311; }
.tabaqah-badge.tabaqah-tier-2  { border-left: 3px solid #2E7D32; }
.tabaqah-badge.tabaqah-tier-3  { border-left: 3px solid #43A047; }
.tabaqah-badge.tabaqah-tier-4  { border-left: 3px solid #66BB6A; }
.tabaqah-badge.tabaqah-tier-5  { border-left: 3px solid #9CCC65; }
.tabaqah-badge.tabaqah-tier-6  { border-left: 3px solid #C0CA33; }
.tabaqah-badge.tabaqah-tier-7  { border-left: 3px solid #FBC02D; }
.tabaqah-badge.tabaqah-tier-8  { border-left: 3px solid #F9A825; }
.tabaqah-badge.tabaqah-tier-9  { border-left: 3px solid #F57F17; }
.tabaqah-badge.tabaqah-tier-10 { border-left: 3px solid #78909C; }
.tabaqah-badge.tabaqah-tier-11 { border-left: 3px solid #546E7A; }
.tabaqah-badge.tabaqah-tier-12 { border-left: 3px solid #37474F; }

/* Generation facet pills on the narrator browse page. Inherit base styling
   from .grade-pill when present, but stand alone if used independently. */
.tabaqah-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.75rem 0 1rem;
    align-items: center;
}
.tabaqah-pill-row .tabaqah-pill-label {
    font-size: 0.8125rem;
    color: var(--pq-gray-600);
    margin-right: 0.5rem;
    font-weight: 500;
}
.tabaqah-pill {
    display: inline-block;
    padding: 0.3125rem 0.75rem;
    border-radius: 100px;
    border: 1px solid var(--pq-gray-200);
    background: #fff;
    color: var(--pq-gray-700);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
    transition: all 0.15s;
}
.tabaqah-pill:hover { background: var(--pq-gray-50); border-color: var(--pq-gray-300); color: var(--pq-gray-900); }
.tabaqah-pill.active { background: var(--pq-green); border-color: var(--pq-green); color: #fff; }
.tabaqah-pill.active.bucket-companion { background: #1B5E20; border-color: #1B5E20; }
.tabaqah-pill.active.bucket-follower  { background: #2E7D32; border-color: #2E7D32; }
.tabaqah-pill.active.bucket-successor { background: #F57F17; border-color: #F57F17; }
.tabaqah-pill.active.bucket-later     { background: #546E7A; border-color: #546E7A; }

/* --- Topic Concordance Page --- */
.topic-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.topic-card { background: #fff; border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); padding: 1.25rem; text-decoration: none; color: inherit; transition: all 0.2s; }
.topic-card:hover { border-color: var(--pq-green); box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }
.topic-card .topic-name { font-weight: 600; font-size: 1.0625rem; margin-bottom: 0.375rem; color: var(--pq-green-dark); }
.topic-card .topic-desc { font-size: 0.875rem; color: var(--pq-gray-600); line-height: 1.5; margin-bottom: 0.5rem; }
.topic-card .topic-count { font-size: 0.8125rem; color: var(--pq-gray-500); }
.collection-pills { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1.5rem; }
.collection-pill { padding: 0.375rem 0.75rem; border: 1px solid var(--pq-gray-200); border-radius: 999px; font-size: 0.8125rem; cursor: pointer; transition: all 0.15s; background: #fff; }
.collection-pill:hover, .collection-pill.active { background: var(--pq-green); color: #fff; border-color: var(--pq-green); }

/* --- Tradition Comparison Page --- */
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.comparison-column { background: #fff; border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); overflow: hidden; }
.comparison-column-header { background: var(--pq-green-pale); padding: 1rem; border-bottom: 1px solid var(--pq-gray-200); }
.comparison-column-header h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.comparison-column-header .comparison-author { font-size: 0.8125rem; color: var(--pq-gray-600); }
.comparison-column-body { padding: 1rem; font-size: 0.9375rem; line-height: 1.7; }

/* --- Interpretive History Page --- */
.timeline-container { position: relative; padding-left: 2.5rem; }
.timeline-container::before { content: ''; position: absolute; left: 1rem; top: 0; bottom: 0; width: 2px; background: var(--pq-gray-200); }
.timeline-entry { position: relative; margin-bottom: 2rem; padding-left: 1.5rem; }
.timeline-entry::before { content: ''; position: absolute; left: -1.5rem; top: 0.5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--pq-green); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--pq-green); }
.timeline-century { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--pq-gold, #B8860B); font-weight: 700; margin-bottom: 0.25rem; }
.timeline-entry h4 { margin: 0 0 0.375rem; }
.timeline-entry .timeline-meta { font-size: 0.8125rem; color: var(--pq-gray-500); margin-bottom: 0.5rem; }
.timeline-entry .timeline-excerpt { font-size: 0.9375rem; line-height: 1.6; color: var(--pq-gray-700); }

/* --- Hadith Info Pages (What Are Hadith, Where to Start, Hadith & Quran) --- */
.hadith-info-section { margin-bottom: 2.5rem; }
.hadith-info-section h2 { color: var(--pq-green-dark); border-bottom: 2px solid var(--pq-green-pale); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.hadith-structure-visual { background: var(--pq-gray-50); border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); padding: 1.5rem; margin: 1rem 0; }
.collection-card-mini { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); padding: 1rem; text-decoration: none; color: inherit; transition: all 0.15s; }
.collection-card-mini:hover { border-color: var(--pq-green); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.reading-path-card { background: linear-gradient(135deg, var(--pq-green-pale), #fff); border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; }
.reading-path-card .step-number { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--pq-green); color: #fff; font-weight: 700; font-size: 0.875rem; margin-right: 0.75rem; }

/* --- Lexicon Letter Detail Pages --- */
.lexicon-letter-header { text-align: center; padding: 2rem 0; }
.lexicon-letter-arabic { font-family: 'Amiri', serif; font-size: 5rem; color: var(--pq-green-dark); line-height: 1; }
.lexicon-letter-translit { font-size: 1.5rem; color: var(--pq-gray-600); margin-top: 0.5rem; }
.lexicon-alpha-nav { display: flex; flex-wrap: wrap; gap: 0.375rem; justify-content: center; margin-bottom: 2rem; }
.lexicon-alpha-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; border-radius: 4px; font-family: 'Amiri', serif; font-size: 1.25rem; color: var(--pq-gray-600); text-decoration: none; transition: all 0.15s; border: 1px solid var(--pq-gray-200); }
.lexicon-alpha-nav a:hover, .lexicon-alpha-nav a.current { background: var(--pq-green); color: #fff; border-color: var(--pq-green); }
.root-word-card { background: #fff; border: 1px solid var(--pq-gray-200); border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 0.75rem; transition: border-color 0.15s; }
.root-word-card:hover { border-color: var(--pq-green); }
.root-word-arabic { font-family: 'Amiri', serif; font-size: 1.5rem; direction: rtl; }
.root-word-meaning { color: var(--pq-gray-600); font-size: 0.9375rem; }

/* --- Word Detail Page (parallel study layout) --- */

/* Layout */
.word-detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    padding: 2rem 0;
}
.word-detail-main {
    min-width: 0;
}
.word-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Page header */
.page-header--word-detail {
    text-align: center;
}
.word-detail-arabic-display {
    font-size: 3.5rem;
    color: #fff;
    line-height: 1.3;
}
.word-detail-title {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 400;
    margin-top: 0.25rem;
}

/* Section cards */
.word-section {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.word-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1b5e20);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--pq-green-pale, #e8f5e9);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.word-section-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-green, #2d7a4f);
    background: var(--pq-green-pale, #e8f5e9);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}
.word-section-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--pq-gray-500, #9e9e9e);
}
.word-section-desc {
    font-size: 0.9rem;
    color: var(--pq-gray-600, #757575);
    margin-bottom: 1rem;
}

/* Lexical Summary table */
.word-summary-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.word-summary-row {
    display: flex;
    align-items: baseline;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--pq-gray-100, #f5f5f5);
}
.word-summary-row:last-child {
    border-bottom: none;
}
.word-summary-label {
    flex: 0 0 160px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-gray-600, #757575);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.word-summary-value {
    flex: 1;
    font-size: 0.95rem;
    color: var(--pq-text-primary, #212121);
}
.word-summary-value.word-summary-big {
    font-size: 2rem;
    line-height: 1.2;
    color: var(--pq-green-dark, #1b5e20);
}
/* Force Arabic text in summary rows to left-align (override dir=rtl) */
.word-summary-value.arabic-text {
    text-align: left;
    direction: ltr;
    unicode-bidi: bidi-override;
}
.word-summary-value.arabic-text .word-summary-note {
    unicode-bidi: normal;
    direction: ltr;
}
.word-summary-meaning {
    font-weight: 500;
    font-size: 1rem;
}
.word-summary-note {
    font-size: 0.75rem;
    color: var(--pq-gray-400, #bbb);
    font-style: normal;
    margin-left: 0.25rem;
}

/* Definitions section */
.root-definitions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.root-definition-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--pq-gray-100, #f5f5f5);
}
.root-definition-item:last-child {
    border-bottom: none;
}
.root-def-number {
    flex: 0 0 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--pq-green-light, #e8f5e9);
    color: var(--pq-green-dark, #1b5e20);
    font-size: 0.8rem;
    font-weight: 700;
}
.root-def-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--pq-text-primary, #212121);
}
.root-def-source {
    font-size: 0.75rem;
    color: var(--pq-gray-400, #bbb);
    margin-top: 0.15rem;
}

/* Pronunciation */
.pronunciation-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pronunciation-phonetic,
.pronunciation-translit-guide,
.pronunciation-letter-breakdown {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.pronunciation-phonetic-label,
.pronunciation-guide-label,
.pronunciation-breakdown-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-gray-600, #757575);
}
.pronunciation-phonetic-value {
    font-size: 1.1rem;
    font-family: monospace;
}
.pronunciation-translit-val {
    font-size: 1rem;
}
.pronunciation-letters {
    font-size: 1.5rem;
    color: var(--pq-green-dark, #1b5e20);
    letter-spacing: 0.1em;
}
.pronunciation-tip {
    background: var(--pq-cream, #faf8f0);
    border-left: 3px solid var(--pq-gold, #c49b2c);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-radius: 0 4px 4px 0;
}
.pronunciation-tip p {
    margin: 0;
}

/* Lane's Lexicon */
.lanes-definition {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--pq-text-primary, #212121);
}
.lanes-definition--empty {
    color: var(--pq-gray-500, #9e9e9e);
    font-style: italic;
}
.lanes-ellipsis {
    color: var(--pq-gray-400, #bbb);
}
.lanes-expand-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-green, #2d7a4f);
    background: var(--pq-green-pale, #e8f5e9);
    border: 1px solid var(--pq-green, #2d7a4f);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.lanes-expand-btn:hover {
    background: var(--pq-green, #2d7a4f);
    color: #fff;
}

/* Morphology / Derived Forms table */
.morphology-detail-table-wrap {
    overflow-x: auto;
}
.morphology-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.morphology-detail-table thead th {
    background: var(--pq-green-dark, #1b5e20);
    color: #fff;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
}
.morphology-detail-table tbody td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--pq-gray-100, #f5f5f5);
    font-size: 0.9rem;
}
.morphology-detail-table tbody tr:hover {
    background: var(--pq-green-pale, #e8f5e9);
}
.morph-arabic-cell {
    font-size: 1.15rem;
    color: var(--pq-green-dark, #1b5e20);
}
.morph-pos-tag {
    display: inline-block;
    background: var(--pq-green, #2d7a4f);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}
.morph-features-cell {
    color: var(--pq-gray-500, #9e9e9e);
}

/* Verse Lexicon table (on verse page) */
.verse-lexicon-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.verse-lexicon-table th { background: var(--pq-green-dark); color: #fff; padding: 0.625rem 0.75rem; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }
.verse-lexicon-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--pq-gray-100); }
.verse-lexicon-table td.arabic-cell { font-family: 'Amiri', serif; font-size: 1.25rem; direction: rtl; text-align: right; }
.verse-lexicon-table tr:hover { background: var(--pq-green-pale); }

/* Old concordance table (kept for compat) */
.concordance-table { width: 100%; border-collapse: collapse; }
.concordance-table th { text-align: left; padding: 0.5rem; background: var(--pq-gray-50); border-bottom: 2px solid var(--pq-gray-200); }
.concordance-table td { padding: 0.5rem; border-bottom: 1px solid var(--pq-gray-100); }

/* --- Concordance Entries (parallel study layout) --- */
.concordance-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
}
/* Concordance POS navigation links */
.concordance-pos-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.15rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--pq-gray-50, #fafafa);
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.6;
}
.concordance-pos-nav-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: var(--pq-green-pale, #e8f5e9);
    color: var(--pq-green-dark, #1b5e20);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.concordance-pos-nav-link:hover {
    background: var(--pq-green, #2d7a4f);
    color: #fff;
}
.concordance-pos-nav-count {
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.8;
}
.concordance-pos-nav-sep {
    color: var(--pq-gray-400, #bdbdbd);
    margin: 0 0.1rem;
}

/* Concordance POS grouping */
.concordance-pos-group {
    margin-bottom: 2rem;
}
.concordance-pos-group:last-child {
    margin-bottom: 0;
}
.concordance-pos-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1b5e20);
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--pq-green-pale, #e8f5e9);
    border-radius: 6px;
    border-left: 4px solid var(--pq-green, #2d7a4f);
}
.concordance-pos-count {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--pq-gray-500, #9e9e9e);
}
.concordance-entry {
    padding: 1rem 0;
    border-bottom: 1px solid var(--pq-gray-100, #f0f0f0);
}
.concordance-entry:last-child {
    border-bottom: none;
}
.concordance-entry--hidden {
    display: none;
}
.concordance-entry-ref {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.concordance-verse-link {
    font-weight: 600;
    color: var(--pq-green-dark, #1b5e20);
    text-decoration: none;
    font-size: 0.95rem;
}
.concordance-verse-link:hover {
    text-decoration: underline;
}
.concordance-pos-badge {
    font-size: 0.7rem;
    color: var(--pq-green, #2d7a4f);
    background: var(--pq-green-pale, #e8f5e9);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 500;
}
/* Full verse display */
.concordance-verse-arabic {
    font-size: 1.25rem;
    line-height: 2;
    color: var(--pq-text-primary, #212121);
    margin-bottom: 0.4rem;
}
.concordance-verse-arabic .concordance-match {
    color: var(--pq-green-dark, #1b5e20);
    font-weight: 700;
    background: var(--pq-green-pale, #e8f5e9);
    padding: 0 0.15em;
    border-radius: 3px;
}
.concordance-verse-translation {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--pq-gray-600, #616161);
    font-style: italic;
    margin-bottom: 0.4rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--pq-gray-200, #e0e0e0);
}
.concordance-entry-words {
    font-size: 0.85rem;
    margin-top: 0.35rem;
}
.concordance-word-form {
    font-size: 1rem;
    color: var(--pq-green-dark, #1b5e20);
    font-weight: 600;
}
.concordance-word-meaning {
    color: var(--pq-gray-600, #757575);
    font-size: 0.82rem;
}
.concordance-show-all-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 0.75rem;
    background: var(--pq-cream, #faf8f0);
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: 6px;
    color: var(--pq-green, #2d7a4f);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.concordance-show-all-btn:hover {
    background: var(--pq-green-pale, #e8f5e9);
}

/* Back to Top button */
.pq-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pq-green, #2d7a4f);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 999;
}
.pq-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.pq-back-to-top:hover {
    background: var(--pq-green-dark, #1b5e20);
}

/* Root stats sidebar card */
.root-stats-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.root-stat-item {
    text-align: center;
}
.root-stat-item .sidebar-stat-big {
    display: block;
}
.root-stat-item .sidebar-stat-label {
    display: block;
}
.word-summary-note {
    font-size: 0.75rem;
    color: var(--pq-gray-400, #bbb);
    font-style: normal;
}

/* Clickable summary values — anchor links to sections */
.word-summary-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--pq-gray-300, #d1d5db);
    transition: border-color 0.2s, color 0.2s;
}

.word-summary-link:hover {
    color: var(--pq-green, #2E7D32);
    border-bottom-color: var(--pq-green, #2E7D32);
}

.word-summary-link--arabic {
    font-family: var(--font-arabic, 'Scheherazade New', serif);
}

.word-summary-link small {
    border-bottom: none;
}

/* (duplicate back-to-top removed — see line 7694) */

/* --- Responsive for all new pages --- */
@media (max-width: 768px) {
    .narrator-cards-grid,
    .topic-cards-grid { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
    .chain-table, .grading-table, .verse-lexicon-table, .concordance-table { font-size: 0.8125rem; }
    .lexicon-letter-arabic { font-size: 3rem; }
    .word-hero .word-arabic { font-size: 2.5rem; }
    .timeline-container { padding-left: 1.5rem; }
    .word-detail-layout { grid-template-columns: 1fr; }
    .word-detail-sidebar { order: -1; }
    .word-summary-row { flex-direction: column; gap: 0.25rem; }
    .word-summary-label { flex: none; }
    .word-detail-arabic-display { font-size: 2.5rem; }
    .root-stats-card { grid-template-columns: repeat(4, 1fr); }
}

/* --- Reusable Table of Contents (.pq-toc) --- */
.pq-toc {
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-2xl);
    margin: var(--space-2xl) 0;
}

.pq-toc-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
}

.pq-toc-list {
    list-style: none;
    counter-reset: pq-toc-counter;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-xs);
}

.pq-toc-list li {
    counter-increment: pq-toc-counter;
}

.pq-toc-list li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--pq-green-dark);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.pq-toc-list li a::before {
    content: counter(pq-toc-counter) ".";
    font-weight: 700;
    color: var(--pq-green);
    min-width: 1.5em;
    flex-shrink: 0;
}

.pq-toc-list li a:hover {
    background: var(--pq-green-pale);
    color: var(--pq-gold-dark, var(--pq-gold));
}

/* --- Scroll margin for in-page anchors (TOC targets) --- */
.concept-card[id],
.reading-path-section[id] {
    scroll-margin-top: 2rem;
}

/* ==============================================
   POS Color-Coded Pill Badges
   ============================================== */

.pq-pos-pill {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    vertical-align: middle;
}

/* --- POS color palette (carefully chosen for accessibility & distinction) --- */

/* Nouns: muted blue */
.pq-pos-noun {
    color: #1a4b7a;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

/* Proper nouns: deeper blue */
.pq-pos-propernoun {
    color: #1e3a5f;
    background: #bfdbfe;
    border: 1px solid #60a5fa;
}

/* Verbs: green */
.pq-pos-verb {
    color: #14532d;
    background: #dcfce7;
    border: 1px solid #86efac;
}

/* Adjectives: amber/gold */
.pq-pos-adj {
    color: #78350f;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

/* Pronouns / Demonstratives / Relatives: purple */
.pq-pos-pron {
    color: #4c1d95;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
}

/* Prepositions: teal */
.pq-pos-prep {
    color: #134e4a;
    background: #ccfbf1;
    border: 1px solid #5eead4;
}

/* Conjunctions / Subordinators: slate */
.pq-pos-conj {
    color: #334155;
    background: #e2e8f0;
    border: 1px solid #94a3b8;
}

/* Adverbs / Time / Location: indigo */
.pq-pos-adv {
    color: #312e81;
    background: #e0e7ff;
    border: 1px solid #a5b4fc;
}

/* Particles (neg, emph, cond, etc.): rose */
.pq-pos-particle {
    color: #881337;
    background: #ffe4e6;
    border: 1px solid #fda4af;
}

/* Initials (Muqatta'at): dark neutral */
.pq-pos-initials {
    color: #1f2937;
    background: #f3f4f6;
    border: 1px solid #9ca3af;
}

/* Determiners: muted cyan */
.pq-pos-det {
    color: #155e75;
    background: #cffafe;
    border: 1px solid #67e8f9;
}

/* Fallback */
.pq-pos-other {
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

/* Size variants for different contexts */
.pq-pos-pill--sm {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
}

.pq-pos-pill--lg {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
}

/* ==============================================
   I'rab (Grammatical Case) Color Indicators
   ============================================== */

.pq-irab-pill {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    vertical-align: middle;
    cursor: help;
    text-transform: uppercase;
}

.pq-irab-pill--sm {
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
}

/* Nominative (marfu') — green: subject / agent */
.pq-irab-nom {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

/* Accusative (mansub) — blue: object / complement */
.pq-irab-acc {
    color: #1e40af;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

/* Genitive (majrur) — amber: after preposition / idafah */
.pq-irab-gen {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

/* I'rab explanation tooltip row */
.pq-irab-explain {
    font-size: 0.7rem;
    color: var(--pq-gray-500, #6b7280);
    font-style: italic;
    line-height: 1.4;
    margin-top: 0.15rem;
}

/* I'rab detail block (used in verse lexicon expanded row or standalone) */
.pq-irab-detail {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* ==============================================
   Occurrence Count Badge (interlinear section)
   ============================================== */

.morph-occ {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--pq-gray-500, #6b7280);
    background: var(--pq-gray-100, #f3f4f6);
    border: 1px solid var(--pq-gray-300, #d1d5db);
    border-radius: 10px;
    padding: 0.05rem 0.35rem;
    margin-top: 0.2rem;
    cursor: help;
}

/* ==========================================================================
   Root Tree Visualization (D3.js radial tree)
   ========================================================================== */

.word-section--root-tree {
    margin-top: var(--space-xl, 2rem);
}

.root-tree-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: var(--space-md, 1rem) auto 0;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: 12px;
    padding: var(--space-md, 1rem);
    overflow: hidden;
}

.root-tree-container svg {
    display: block;
    margin: 0 auto;
}

/* POS legend row above the tree */
.root-tree-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
    margin-top: var(--space-sm, 0.75rem);
}

.root-tree-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--pq-gray-600, #757575);
}

.root-tree-legend-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-gray-500, #6b7280);
}

/* Tooltip that appears on hover */
.root-tree-tooltip {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    background: var(--pq-gray-800, #1f2937);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.5;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: 220px;
    transition: opacity 0.15s ease;
}

.root-tree-tooltip em {
    color: #a5f3fc;
    font-style: italic;
}

.root-tree-tooltip strong {
    color: #86efac;
}

.root-tree-tt-arabic {
    font-family: var(--font-arabic, 'Scheherazade New', serif);
    font-size: 1.3rem;
    line-height: 1.6;
    display: block;
    text-align: right;
}

/* Flash highlight when scrolling from tree click */
.concordance-pos-group--flash {
    animation: pq-flash-highlight 1.5s ease;
}

@keyframes pq-flash-highlight {
    0%   { background-color: rgba(46, 125, 50, 0.15); }
    100% { background-color: transparent; }
}

/* Responsive: tighten on mobile */
@media (max-width: 768px) {
    .root-tree-container {
        padding: 0.5rem;
        border-radius: 8px;
    }

    .root-tree-legend {
        gap: 0.35rem 0.6rem;
    }
}

/* ==========================================================================
   WORD AUDIO PLAYBACK
   ========================================================================== */

/* --- Play button (default size) --- */
.pq-audio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid #2e7d32;
    border-radius: 50%;
    background: transparent;
    color: #2e7d32;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    vertical-align: middle;
    flex-shrink: 0;
}

.pq-audio-btn:hover,
.pq-audio-btn:focus-visible {
    background: #2e7d32;
    color: #fff;
    outline: none;
}

.pq-audio-btn:active {
    transform: scale(0.92);
}

/* Small variant (for interlinear cards + lexicon table) */
.pq-audio-btn--sm {
    width: 24px;
    height: 24px;
    font-size: 10px;
    border-width: 1px;
}

/* State: loading */
.pq-audio-btn--loading {
    border-color: #9e9e9e;
    color: #9e9e9e;
    cursor: wait;
}

.pq-audio-btn--loading .pq-audio-icon--play    { display: none !important; }
.pq-audio-btn--loading .pq-audio-icon--loading  { display: inline !important; }
.pq-audio-btn--loading .pq-audio-icon--playing  { display: none !important; }

/* State: playing */
.pq-audio-btn--playing {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
    animation: pq-audio-pulse 1.5s infinite;
}

.pq-audio-btn--playing .pq-audio-icon--play    { display: none !important; }
.pq-audio-btn--playing .pq-audio-icon--loading  { display: none !important; }
.pq-audio-btn--playing .pq-audio-icon--playing  { display: inline !important; }

@keyframes pq-audio-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0); }
}

/* State: error */
.pq-audio-btn--error {
    border-color: #c62828;
    color: #c62828;
}

/* --- Pronunciation page "Listen" row --- */
.pronunciation-listen {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: #f1f8e9;
    border-radius: 8px;
    border: 1px solid #c5e1a5;
}

.pronunciation-listen-label {
    font-weight: 600;
    color: #33691e;
    font-size: 0.875rem;
}

.pronunciation-listen-word {
    font-size: 1.4rem;
    line-height: 1.4;
}

.pronunciation-listen-ref {
    font-size: 0.75rem;
    color: #666;
    margin-left: auto;
}

/* --- Interlinear card: audio button positioning --- */
.morphology-word .pq-audio-btn {
    margin-top: 4px;
}

/* --- Verse lexicon table: audio button inside Arabic cell --- */
.vlex-arabic-stack .pq-audio-btn {
    margin: 2px 4px 0 4px;
}

/* --- Dark mode adjustments (if dark mode ever added) --- */
@media (prefers-color-scheme: dark) {
    .pronunciation-listen {
        background: rgba(46, 125, 50, 0.1);
        border-color: rgba(46, 125, 50, 0.3);
    }

    .pronunciation-listen-label {
        color: #81c784;
    }
}

/* --- Concordance entries: audio buttons inline with word meaning --- */
.concordance-entry-words {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.concordance-audio-btns {
    display: inline-flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   Similar Verses (Mutashabihat) Sidebar Section
   ------------------------------------------------------------------ */

.similar-verses-section {
    border-top: 1px solid var(--border, #e5e7eb);
    padding-top: 1rem;
}

/* Collapse toggle button */
.sidebar-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
}
.sidebar-collapse-toggle h3 {
    margin: 0;
    flex: 1;
}
.similar-count {
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.65;
    margin-left: 0.35em;
}
.collapse-icon {
    font-size: 0.65em;
    transition: transform 0.25s ease;
    opacity: 0.5;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.sidebar-collapse-toggle.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* Body */
.similar-verses-body {
    margin-top: 0.75rem;
}
.similar-verses-body[hidden] {
    display: none;
}
.similar-verses-intro {
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
    margin: 0 0 0.75rem 0;
    line-height: 1.45;
}

/* Individual similar verse card */
.similar-verse-card {
    background: var(--bg-raised, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
}
.similar-verse-card:last-child {
    margin-bottom: 0;
}

/* Strength-based left border accent */
.similar-verse--high {
    border-left: 3px solid #059669;
}
.similar-verse--medium {
    border-left: 3px solid #d97706;
}
.similar-verse--low {
    border-left: 3px solid #9ca3af;
}

.similar-verse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}
.similar-verse-ref {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--link, #0d6ebd);
    text-decoration: none;
}
.similar-verse-ref:hover {
    text-decoration: underline;
}
.similar-score {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: var(--bg-subtle, #f3f4f6);
    color: var(--text-muted, #6b7280);
}
.similar-verse--high .similar-score {
    background: #ecfdf5;
    color: #059669;
}
.similar-verse--medium .similar-score {
    background: #fffbeb;
    color: #d97706;
}

/* Arabic text with diff highlighting */
.similar-verse-text {
    font-size: 1.15rem;
    line-height: 2;
    word-spacing: 0.15em;
}
.sim-shared {
    color: var(--text, #111827);
    background: rgba(5, 150, 105, 0.10);
    border-radius: 0.2rem;
    padding: 0.05em 0.15em;
}
.sim-diff {
    color: var(--text-muted, #9ca3af);
    opacity: 0.7;
}
.similar-verse-translit {
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--pq-gray-500, #757575);
    margin-top: 0.35rem;
    line-height: 1.5;
}
.similar-verse-translation {
    font-size: 0.8125rem;
    color: var(--pq-gray-700, #616161);
    margin-top: 0.25rem;
    line-height: 1.5;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
    .similar-verse-card {
        background: var(--bg-raised, #1f2937);
        border-color: var(--border, #374151);
    }
    .sim-shared {
        background: rgba(5, 150, 105, 0.2);
        color: #d1fae5;
    }
    .sim-diff {
        color: #6b7280;
    }
    .similar-verse--high .similar-score {
        background: #064e3b;
        color: #6ee7b7;
    }
    .similar-verse--medium .similar-score {
        background: #78350f;
        color: #fcd34d;
    }
}

/* ===================================================================
   THEMATIC JOURNEY — Tab Toggle + Timeline + Cards
   =================================================================== */

/* Tab toggle */
.conc-view-tabs {
    display: flex;
    gap: 4px;
    margin: 16px 0 20px;
    padding: 4px;
    background: var(--pq-surface-alt, #f5f3ef);
    border-radius: 10px;
    width: fit-content;
}
.conc-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--pq-text-secondary, #6b5e50);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.conc-view-tab:hover {
    color: var(--pq-text-primary, #2c2418);
    background: rgba(255,255,255,0.5);
}
.conc-view-tab--active {
    background: #fff;
    color: var(--pq-text-primary, #2c2418);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-weight: 600;
}
.conc-view-tab svg {
    flex-shrink: 0;
    opacity: 0.6;
}
.conc-view-tab--active svg {
    opacity: 1;
}
.conc-view-tab-count {
    font-size: 0.75rem;
    padding: 1px 6px;
    background: var(--pq-surface-alt, #f0ebe3);
    border-radius: 10px;
    color: var(--pq-text-secondary, #6b5e50);
}
.conc-view-tab--active .conc-view-tab-count {
    background: var(--pq-accent, #b08d57);
    color: #fff;
}

/* Period summary bar */
.journey-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--pq-surface-alt, #f9f7f3);
    border-radius: 10px;
    border: 1px solid var(--pq-border, #e8e0d4);
}
.journey-period-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}
.journey-period-icon {
    display: flex;
    color: var(--period-color);
}
.journey-period-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-text-primary, #2c2418);
    white-space: nowrap;
}
.journey-period-num {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--period-color);
    min-width: 24px;
}
.journey-period-bar {
    flex: 1;
    height: 5px;
    background: var(--pq-border, #e8e0d4);
    border-radius: 3px;
    overflow: hidden;
    min-width: 40px;
}
.journey-period-fill {
    height: 100%;
    background: var(--period-color);
    border-radius: 3px;
    transition: width 0.6s ease;
}
.journey-period-pct {
    font-size: 0.75rem;
    color: var(--pq-text-secondary, #6b5e50);
    min-width: 28px;
    text-align: right;
}

/* Mini-scroll timeline */
.journey-timeline-wrap {
    margin-bottom: 24px;
    padding: 0 4px;
}
.journey-timeline-track {
    position: relative;
    height: 20px;
    background: linear-gradient(to right, #c08b5c22, #7a6e5e22, #3a7a6e22);
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
}
.journey-dot {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 1;
}
.journey-dot:hover {
    transform: translate(-50%, -50%) scale(2.2);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
    z-index: 2;
}
.journey-timeline-labels {
    display: flex;
    justify-content: space-between;
}
.journey-tl-label {
    font-size: 0.6875rem;
    color: var(--pq-text-secondary, #8a7d6b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Period divider */
.journey-period-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
}
.journey-period-divider-line {
    flex: 1;
    height: 1px;
    background: var(--period-color, #ccc);
    opacity: 0.35;
}
.journey-period-divider-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--period-color, #666);
    white-space: nowrap;
}

/* Journey cards */
.journey-cards {
    position: relative;
    padding-left: 20px;
}
.journey-card {
    display: flex;
    gap: 14px;
    margin-bottom: 2px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}
.journey-card--visible {
    opacity: 1;
    transform: translateY(0);
}
.journey-card--hidden {
    display: none;
}
.journey-card--highlight {
    opacity: 1;
    transform: translateY(0);
}
.journey-card--highlight .journey-card-body {
    box-shadow: 0 0 0 2px var(--period-color, #b08d57), 0 4px 12px rgba(0,0,0,0.1);
}

/* Card timeline marker */
.journey-card-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 16px;
    flex-shrink: 0;
    padding-top: 18px;
}
.journey-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    flex-shrink: 0;
    z-index: 1;
}
.journey-card-line {
    width: 2px;
    flex: 1;
    background: var(--pq-border, #e0d8cc);
    min-height: 16px;
}
.journey-card:last-child .journey-card-line {
    display: none;
}

/* Card body */
.journey-card-body {
    flex: 1;
    background: #fff;
    border: 1px solid var(--pq-border, #e8e0d4);
    border-left: 3px solid var(--period-color, #ccc);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s ease;
}
.journey-card-body:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.journey-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.journey-card-ref {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--pq-accent, #b08d57);
    text-decoration: none;
}
.journey-card-ref:hover {
    text-decoration: underline;
}
.journey-card-surah-ar {
    font-size: 0.8125rem;
    color: var(--pq-text-secondary, #6b5e50);
}
.journey-card-order {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--pq-text-secondary, #8a7d6b);
    background: var(--pq-surface-alt, #f5f3ef);
    padding: 2px 8px;
    border-radius: 10px;
}
.journey-card-arabic {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--pq-text-primary, #2c2418);
    margin-bottom: 6px;
}
.journey-card-arabic .concordance-match {
    color: var(--pq-accent, #b08d57);
    font-weight: 700;
}
.journey-card-trans {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--pq-text-secondary, #5a5045);
    margin-bottom: 6px;
}
.journey-card-meaning {
    font-size: 0.75rem;
    color: var(--pq-text-secondary, #6b5e50);
    font-style: italic;
}
.journey-card-meaning-label {
    font-weight: 600;
    font-style: normal;
    margin-right: 4px;
}

/* Show all button */
.journey-show-all-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    border: 1px dashed var(--pq-border, #d0c8ba);
    background: transparent;
    color: var(--pq-accent, #b08d57);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.journey-show-all-btn:hover {
    background: var(--pq-surface-alt, #f9f7f3);
}

/* Responsive */
@media (max-width: 600px) {
    .conc-view-tabs {
        width: 100%;
    }
    .conc-view-tab {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.8125rem;
    }
    .journey-summary-bar {
        flex-direction: column;
        gap: 8px;
    }
    .journey-period-stat {
        min-width: unset;
    }
    .journey-cards {
        padding-left: 12px;
    }
    .journey-card-body {
        padding: 10px 12px;
    }
    .journey-card-arabic {
        font-size: 1.05rem;
    }
}

/* ===================================================================
   SEMANTIC FIELD EXPLORER — Constellation Map
   =================================================================== */

.semantic-explorer {
    max-width: var(--container-width, 1200px);
    margin: var(--space-xl, 2rem) auto;
    padding: 0 var(--space-lg, 1.5rem);
}

/* Search bar */
.sem-search-bar {
    margin-bottom: var(--space-lg, 1.5rem);
}
.sem-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid var(--pq-border, #e0d8cc);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--pq-surface-alt, #f9f7f3);
    color: var(--pq-text-primary, #2c2418);
    transition: border-color 0.2s ease;
}
.sem-search-input:focus {
    outline: none;
    border-color: var(--pq-green-dark, #2D6A4F);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

/* Constellation grid */
.sem-constellation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--space-lg, 1.5rem);
    align-items: flex-start;
}

/* Bubbles */
.sem-bubble {
    position: relative;
    border: 1px solid var(--bubble-color, #888);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    overflow: hidden;
}
.sem-bubble::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bubble-color, #888);
    opacity: 0.04;
    border-radius: 12px;
    transition: opacity 0.2s ease;
}
.sem-bubble:hover::before {
    opacity: 0.1;
}
.sem-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--bubble-color);
}
.sem-bubble--active {
    border-width: 2px;
    border-color: var(--bubble-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.sem-bubble--active::before {
    opacity: 0.12;
}
.sem-bubble-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Bubble sizes */
.sem-bubble--lg {
    padding: 16px 20px;
}
.sem-bubble--sm {
    padding: 8px 12px;
}
.sem-bubble--sm .sem-bubble-preview {
    display: none;
}

.sem-bubble-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--bubble-color, #333);
    line-height: 1.3;
}
.sem-bubble--sm .sem-bubble-label {
    font-size: 0.8rem;
}
.sem-bubble--lg .sem-bubble-label {
    font-size: 0.95rem;
}
.sem-bubble-count {
    font-size: 0.7rem;
    color: var(--pq-text-muted, #8a7d6b);
    font-weight: 500;
}
.sem-bubble-preview {
    font-size: 0.85rem;
    color: var(--pq-text-secondary, #5a5045);
    margin-top: 2px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* More fields toggle */
.sem-more-fields {
    margin-bottom: var(--space-lg, 1.5rem);
}
.sem-more-toggle {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-accent, #b08d57);
    cursor: pointer;
    border: 1px dashed var(--pq-border, #d0c8ba);
    border-radius: 8px;
    margin-bottom: var(--space-md, 1rem);
}
.sem-more-toggle:hover {
    background: var(--pq-surface-alt, #f9f7f3);
}
.sem-constellation--extra {
    margin-top: var(--space-md, 1rem);
}

/* Detail panel */
.sem-detail-panel {
    background: var(--pq-surface-alt, #f9f7f3);
    border: 1px solid var(--pq-border, #e0d8cc);
    border-radius: 12px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-md, 1rem);
    animation: sem-panel-in 0.3s ease;
}
@keyframes sem-panel-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.sem-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md, 1rem);
}
.sem-detail-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-text-primary, #2c2418);
    margin: 0;
}
.sem-detail-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pq-text-muted, #8a7d6b);
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}
.sem-detail-close:hover {
    background: rgba(0,0,0,0.06);
    color: var(--pq-text-primary, #2c2418);
}

/* Root grid inside panel */
.sem-root-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.sem-root-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--pq-border, #e0d8cc);
    border-radius: 8px;
    transition: all 0.15s ease;
    text-align: center;
}
.sem-root-card:hover {
    border-color: var(--pq-green-dark, #2D6A4F);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.sem-root-arabic {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--pq-text-primary, #2c2418);
}
.sem-root-english {
    font-size: 0.75rem;
    color: var(--pq-text-secondary, #5a5045);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.sem-root-occ {
    font-size: 0.65rem;
    color: var(--pq-text-muted, #8a7d6b);
    background: var(--pq-surface-alt, #f5f3ef);
    padding: 1px 6px;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .sem-constellation {
        gap: 6px;
    }
    .sem-bubble {
        padding: 8px 12px;
    }
    .sem-bubble--lg {
        padding: 10px 14px;
    }
    .sem-bubble-preview {
        display: none;
    }
    .sem-root-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .sem-detail-title {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   Tafsir Source Page — About Card
   ========================================================================== */

.tafsir-about-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--pq-border, #e0d8cc);
    margin-bottom: var(--space-xl);
}
.tafsir-about-header {
    background: linear-gradient(135deg, var(--pq-green-dark) 0%, var(--pq-navy-dark, #1a3a2a) 100%);
    padding: var(--space-sm) var(--space-lg);
}
.tafsir-about-header h3 {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.tafsir-about-body {
    padding: var(--space-lg);
    background: var(--pq-surface-alt, #f9f7f3);
}
.tafsir-about-desc {
    margin: 0 0 var(--space-md);
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--pq-text-primary, #2c2418);
}
.tafsir-about-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-md);
}
.tafsir-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tafsir-meta-item--full {
    grid-column: 1 / -1;
}
.tafsir-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pq-text-muted, #8a7d6b);
}
.tafsir-meta-value {
    font-size: 0.875rem;
    color: var(--pq-text-primary, #2c2418);
}
.tafsir-method-detail {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--pq-text-secondary, #5c5347);
    font-style: italic;
}
.tafsir-scholar-link {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-weight: 600;
}
.tafsir-scholar-link:hover {
    text-decoration: underline;
}
.tafsir-bio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    text-decoration: none;
    padding: var(--space-xs) 0;
}
.tafsir-bio-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .tafsir-about-meta {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Tafsir Surah Selector — Chips + Collapsible
   ========================================================================== */

.tafsir-surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
    margin-bottom: var(--space-xl);
}
.tafsir-surah-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--pq-border, #e0d8cc);
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: all .15s ease;
}
.tafsir-surah-chip:hover {
    border-color: var(--pq-green-dark);
    background: var(--pq-surface-alt, #f9f7f3);
}
.tafsir-surah-chip--active {
    border-color: var(--pq-green-dark);
    color: #fff;
    background: var(--pq-green-dark);
}
.tafsir-surah-num {
    font-weight: 600;
    min-width: 20px;
}
.tafsir-surah-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Collapsible surah selector */
.tafsir-surah-selector {
    margin: var(--space-lg) 0 var(--space-md);
    border: 1px solid var(--pq-border, #e0d8cc);
    border-radius: 10px;
    overflow: hidden;
}
.tafsir-surah-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--pq-surface-alt, #f9f7f3);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pq-text-primary, #2c2418);
    text-align: left;
    font-family: inherit;
}
.tafsir-surah-toggle:hover {
    background: var(--pq-border, #e8e0d4);
}
.tafsir-surah-toggle-current {
    font-weight: 400;
    color: var(--pq-green-dark);
}
.tafsir-surah-toggle-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.tafsir-surah-selector:not(.tafsir-surah-selector--collapsed) .tafsir-surah-toggle-icon {
    transform: rotate(180deg);
}
.tafsir-surah-grid-wrap {
    padding: var(--space-sm) var(--space-md) var(--space-md);
}
.tafsir-surah-grid-wrap .tafsir-surah-grid {
    margin-bottom: 0;
}

/* ==========================================================================
   Tafsir Chapter Heading
   ========================================================================== */

.tafsir-chapter-heading {
    margin: var(--space-lg) 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-green-dark);
}
.tafsir-chapter-source {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pq-green-dark);
    margin-bottom: 4px;
}
.tafsir-chapter-surah {
    display: block;
    font-size: 1.4rem;
}
.tafsir-chapter-surah .arabic-text {
    font-size: 1.1em;
    margin: 0 8px;
}
.tafsir-chapter-english {
    font-weight: 400;
    font-size: 0.65em;
    color: var(--pq-text-muted, #8a7d6b);
}
.tafsir-chapter-meta {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--pq-text-muted, #8a7d6b);
    margin-top: 4px;
}

/* ==========================================================================
   Tafsir Entries
   ========================================================================== */

.tafsir-entry {
    margin-bottom: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: #fff;
    border: 1px solid var(--pq-border, #e8e0d4);
    border-left: 3px solid var(--pq-green-dark);
    border-radius: 8px;
}
.tafsir-entry-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.tafsir-entry-ref {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--pq-green-dark);
    text-decoration: none;
}
.tafsir-entry-ref:hover {
    text-decoration: underline;
}
.tafsir-entry-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--pq-text-primary, #2c2418);
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.pq-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pq-green-dark);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 999;
}
.pq-back-to-top--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.pq-back-to-top:hover {
    background: var(--pq-navy-dark, #1a3a2a);
}

/* ==========================================================================
   Scholar Biography Page
   ========================================================================== */

.scholar-vitals {
    background: var(--pq-surface-alt, #f9f7f3);
    border: 1px solid var(--pq-border, #e8e0d4);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}
.scholar-vitals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md) var(--space-xl);
}
.scholar-vital-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.scholar-vital-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pq-text-muted, #8a7d6b);
}
.scholar-vital-value {
    font-size: 0.9rem;
    color: var(--pq-text-primary, #2c2418);
}
.scholar-section {
    margin-bottom: var(--space-xl);
}
.scholar-section h2 {
    font-size: 1.25rem;
    margin: 0 0 var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--pq-green-dark);
    color: var(--pq-text-primary, #2c2418);
}
.scholar-prose {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--pq-text-primary, #2c2418);
}
.scholar-prose p {
    margin: 0 0 var(--space-md);
}
.scholar-works-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.scholar-works-list li {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--pq-border, #e8e0d4);
    font-style: italic;
}
.scholar-works-list li:last-child {
    border-bottom: none;
}
.scholar-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background: var(--pq-green-dark);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}
.scholar-cta:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .scholar-vitals-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------
   Bismillah Row (surah page) & Banner (single-ayah page)
   ------------------------------------------------------------------ */

/* Surah page: decorative Bismillah card before verse 1 */
.pq-bismillah-row {
    text-align: center;
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-xl) var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--pq-white);
}

.pq-bismillah-row:hover {
    border-color: var(--pq-gray-200); /* No highlight on hover — not clickable */
}

.pq-bismillah-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.pq-bismillah-arabic {
    font-family: var(--font-arabic);
    font-size: 2.5rem;
    line-height: 1.6;
    color: var(--pq-green);
    padding: 0;
}

.pq-bismillah-translation {
    font-size: 0.9375rem;
    color: var(--pq-gray-500);
    font-style: italic;
}

/* Single-ayah page: banner above verse 1 */
.pq-bismillah-banner {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--pq-gray-200);
}

.pq-bismillah-banner .pq-bismillah-arabic {
    display: block;
    font-family: var(--font-arabic);
    font-size: 2.75rem;
    line-height: 1.6;
    color: var(--pq-green);
    margin-bottom: var(--space-xs);
}

.pq-bismillah-banner .pq-bismillah-translation {
    display: block;
    font-size: 0.9375rem;
    color: var(--pq-gray-500);
    font-style: italic;
}

/* Translator-surah page: Bismillah card inherits .translator-ayah-card layout */
.translator-ayah-list .pq-bismillah-row {
    text-align: center;
    cursor: default;
}
.translator-ayah-list .pq-bismillah-row .translator-ayah-arabic {
    font-size: 2.5rem;
    color: var(--pq-green);
}
.translator-ayah-list .pq-bismillah-row .translator-ayah-translation {
    font-style: italic;
    color: var(--pq-gray-500);
}

@media (max-width: 600px) {
    .pq-bismillah-arabic {
        font-size: 2rem;
    }
    .pq-bismillah-banner .pq-bismillah-arabic {
        font-size: 2.25rem;
    }
    .translator-ayah-list .pq-bismillah-row .translator-ayah-arabic {
        font-size: 2rem;
    }
}

/* ------------------------------------------------------------------
   Full Surah Audio Player
   ------------------------------------------------------------------ */

.pq-surah-audio-player {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-md, 1rem);
    padding: var(--space-sm, 0.75rem) var(--space-md, 1rem);
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: var(--radius-md, 8px);
}

.pq-surah-audio-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    flex-wrap: wrap;
}

.pq-surah-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5em 1.2em;
    border: 2px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-md, 8px);
    background: var(--pq-white, #fff);
    color: var(--pq-green, #2E7D32);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pq-surah-play-btn:hover {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
}

.pq-surah-play-btn.pq-splay--playing {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
}

.pq-surah-play-btn.pq-splay--loading {
    opacity: 0.7;
    cursor: wait;
}

.pq-splay-icon {
    font-size: 1em;
}

.pq-surah-audio-progress {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
}

.pq-surah-audio-bar {
    flex: 1;
    height: 6px;
    background: var(--pq-gray-200, #e0e0e0);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.pq-surah-audio-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--pq-green, #2E7D32);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.pq-surah-audio-time {
    font-size: 0.75rem;
    color: var(--pq-gray-500, #888);
    min-width: 5em;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .pq-surah-audio-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .pq-surah-play-btn {
        justify-content: center;
    }
}

/* ------------------------------------------------------------------
   Full Verse Audio Player
   ------------------------------------------------------------------ */

.pq-verse-audio-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    margin-top: var(--space-md, 1rem);
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    background: var(--pq-cream, #FAF7F0);
    border-radius: var(--radius-md, 8px);
}

.pq-verse-audio-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    flex-wrap: wrap;
    justify-content: center;
}

.pq-verse-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5em 1.2em;
    border: 2px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-md, 8px);
    background: var(--pq-white, #fff);
    color: var(--pq-green, #2E7D32);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pq-verse-play-btn:hover {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
}

.pq-verse-play-btn.pq-vplay--playing {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
}

.pq-verse-play-btn.pq-vplay--loading {
    opacity: 0.7;
    cursor: wait;
}

.pq-vplay-icon {
    font-size: 1em;
}

.pq-reciter-select {
    padding: 0.4em 0.6em;
    border: 1px solid var(--pq-gray-300, #ccc);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8125rem;
    background: var(--pq-white, #fff);
    color: var(--pq-gray-700, #333);
    max-width: 180px;
}

.pq-verse-audio-progress {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
}

.pq-verse-audio-bar {
    flex: 1;
    height: 4px;
    background: var(--pq-gray-200, #e0e0e0);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.pq-verse-audio-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--pq-green, #2E7D32);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.pq-verse-audio-time {
    font-size: 0.75rem;
    color: var(--pq-gray-500, #888);
    min-width: 3em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   Verse Completion Tracker
   ------------------------------------------------------------------ */

.pq-completion-section {
    border-top: 1px solid var(--pq-gray-200, #e0e0e0);
    padding-top: var(--space-md, 1rem);
}

.pq-student-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
    margin-bottom: var(--space-sm, 0.5rem);
}

.pq-student-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-gray-600, #555);
    white-space: nowrap;
}

.pq-student-select {
    flex: 1;
    padding: 0.35em 0.5em;
    border: 1px solid var(--pq-gray-300, #ccc);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8125rem;
    background: var(--pq-white, #fff);
    color: var(--pq-gray-700, #333);
}

.pq-add-student-row {
    display: flex;
    gap: var(--space-xs, 0.25rem);
    margin-bottom: var(--space-sm, 0.5rem);
}

.pq-new-student-input {
    flex: 1;
    padding: 0.35em 0.5em;
    border: 1px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8125rem;
}

.pq-save-student-btn {
    padding: 0.35em 0.8em;
    border: 1px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-sm, 4px);
    background: var(--pq-green, #2E7D32);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.pq-save-student-btn:hover {
    opacity: 0.9;
}

.pq-mark-complete-btn {
    display: block;
    width: 100%;
    padding: 0.6em 1em;
    border: 2px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-md, 8px);
    background: var(--pq-white, #fff);
    color: var(--pq-green, #2E7D32);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}

.pq-mark-complete-btn:hover:not(:disabled) {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
}

.pq-mark-complete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pq-mark-complete-btn--done {
    background: var(--pq-green, #2E7D32);
    color: var(--pq-white, #fff);
    border-color: var(--pq-green, #2E7D32);
}

.pq-mark-complete-btn--done:hover:not(:disabled) {
    background: var(--pq-white, #fff);
    color: var(--pq-green, #2E7D32);
}

.pq-check-icon {
    margin-right: 0.3em;
}

.pq-completion-date {
    font-size: 0.75rem;
    color: var(--pq-gray-500, #888);
    text-align: center;
    margin-top: var(--space-xs, 0.25rem);
    margin-bottom: 0;
}

/* ── Surah-Level Reading Tracker ── */

.pq-surah-tracker-progress {
    display: flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
    margin-bottom: var(--space-xs, 0.25rem);
}

.pq-surah-tracker-bar {
    flex: 1;
    height: 8px;
    background: var(--pq-gray-200, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}

.pq-surah-tracker-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--pq-green, #2E7D32);
    border-radius: 4px;
    transition: width 0.25s ease;
}

.pq-surah-tracker-pct {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pq-green, #2E7D32);
    min-width: 2.5em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pq-surah-tracker-detail {
    font-size: 0.75rem;
    color: var(--pq-gray-500, #888);
    margin: 0 0 var(--space-sm, 0.5rem);
    text-align: center;
}

@media (max-width: 600px) {
    .pq-verse-audio-controls {
        flex-direction: column;
    }
    .pq-reciter-select {
        max-width: 100%;
        width: 100%;
    }
}

/* ===================================================================
   LANE'S LEXICON PAGES
   =================================================================== */

/* --- Hero Section --- */
.lanes-hero {
    background: var(--pq-green-dark);
    color: var(--pq-white);
    text-align: center;
    padding: var(--space-3xl) var(--space-md) var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.lanes-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.lanes-hero-ornament {
    font-family: var(--font-arabic);
    font-size: 1.65rem;
    opacity: 0.55;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
    direction: rtl;
}

.lanes-hero-title {
    font-family: var(--font-arabic);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--pq-gold);
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.lanes-hero-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 1.25rem;
}

.lanes-hero-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.lanes-date-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.lanes-date-sep {
    opacity: 0.35;
    font-size: 1.2rem;
}

/* --- Compact Hero (sub-pages) --- */
.lanes-hero--compact {
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
}

.lanes-hero--compact .lanes-hero-title {
    font-size: 1.85rem;
    margin-bottom: var(--space-sm);
}

.lanes-hero--compact .lanes-hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 0;
}

/* --- Section Grid (Overview page) --- */
.lanes-section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.lanes-section-card {
    display: flex;
    flex-direction: column;
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.lanes-section-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 6px 20px rgba(30,90,30,0.10);
    transform: translateY(-3px);
}

.lanes-section-icon {
    font-size: 1.65rem;
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.lanes-section-icon.arabic-text {
    font-family: var(--font-arabic);
    color: var(--pq-green-dark);
}

.lanes-section-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pq-gray-900);
    margin: 0 0 var(--space-sm);
    line-height: 1.3;
}

.lanes-section-card-desc {
    font-size: 0.85rem;
    color: var(--pq-gray-600);
    line-height: 1.55;
    margin: 0 0 var(--space-md);
    flex: 1;
}

.lanes-section-card-action {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pq-green);
    transition: color var(--transition-fast);
}

.lanes-section-card:hover .lanes-section-card-action {
    color: var(--pq-green-dark);
}

/* --- Lane's Sidebar (Quick Jump) --- */
.lanes-sidebar .sidebar-quick-jump {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-sm);
}

.lanes-sidebar .sidebar-jump-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--pq-gray-700);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.lanes-sidebar .sidebar-jump-link:hover {
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
}

.lanes-sidebar .sidebar-jump-link--active {
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    font-weight: 600;
}

.lanes-sidebar .sidebar-jump-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.lanes-sidebar .sidebar-stat-big {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    line-height: 1.2;
    margin-top: var(--space-sm);
}

.lanes-sidebar .sidebar-stat-big:first-child {
    margin-top: 0;
}

.lanes-sidebar .sidebar-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--pq-gray-500);
    margin-bottom: var(--space-xs);
}

.lanes-sidebar .sidebar-link-all {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pq-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.lanes-sidebar .sidebar-link-all:hover {
    color: var(--pq-green-dark);
}

/* --- Section Headings & Intro --- */
.lanes-section-heading {
    font-family: var(--font-arabic);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-sm);
}

.lanes-section-intro {
    color: var(--pq-gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.75rem;
    max-width: 680px;
}

/* --- Arabic Alphabet Grid --- */
.lanes-alphabet-grid--arabic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.75rem;
}

.lanes-letter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-sm);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.lanes-letter-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 4px 12px rgba(30,90,30,0.1);
    transform: translateY(-2px);
}

.lanes-letter-ar {
    font-family: var(--font-arabic);
    font-size: 2.2rem;
    color: var(--pq-green-dark);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.lanes-letter-name {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    font-weight: 500;
}

.lanes-letter-count {
    font-size: 0.7rem;
    color: var(--pq-gray-400);
    margin-top: 0.2rem;
}

/* --- English Transliteration List --- */
.lanes-alphabet-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 540px;
}

.lanes-english-row {
    display: flex;
    align-items: center;
    padding: 0.75rem var(--space-md);
    text-decoration: none;
    border-bottom: 1px solid var(--pq-gray-100);
    transition: background var(--transition-fast);
}

.lanes-english-row:hover {
    background: var(--pq-green-pale);
}

.lanes-en-letter {
    font-weight: 600;
    font-size: 1rem;
    color: var(--pq-gray-900);
    min-width: 100px;
}

.lanes-en-arabic {
    font-family: var(--font-arabic);
    font-size: 1.35rem;
    color: var(--pq-green-dark);
    flex: 1;
    direction: rtl;
    text-align: left;
}

.lanes-en-arrow {
    color: var(--pq-gray-400);
    font-size: 1rem;
    margin-left: auto;
    padding-left: var(--space-md);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.lanes-english-row:hover .lanes-en-arrow {
    color: var(--pq-green);
    transform: translateX(3px);
}

/* --- Biography Layout --- */
.lanes-bio-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
    align-items: start;
}

.lanes-bio-main p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--pq-gray-800);
    margin: 0 0 1.25rem;
}

.lanes-bio-h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    margin: var(--space-xl) 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--pq-green-pale);
}

.lanes-bio-h3:first-of-type,
.lanes-bio-h3:first-child {
    margin-top: var(--space-md);
}

/* --- Blockquote Cards --- */
.lanes-bio-card--highlight {
    background: var(--pq-cream);
    border-left: 4px solid var(--pq-gold);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.25rem var(--space-lg);
    margin: var(--space-lg) 0;
}

.lanes-blockquote {
    margin: 0;
    padding: 0;
    font-family: var(--font-arabic);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--pq-gray-800);
    font-style: italic;
}

.lanes-cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--pq-gray-500);
    font-style: normal;
}

/* --- Sidebar Fact Boxes --- */
.lanes-bio-factbox {
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem var(--space-md);
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.lanes-factbox-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.85rem;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-green-pale);
}

.lanes-factlist {
    margin: 0;
    padding: 0;
}

.lanes-factlist dt {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pq-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.75rem;
}

.lanes-factlist dt:first-child {
    margin-top: 0;
}

.lanes-factlist dd {
    margin: 0.15rem 0 0;
    font-size: 0.88rem;
    color: var(--pq-gray-800);
    line-height: 1.45;
}

/* --- Other Works List --- */
.lanes-other-works {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lanes-other-works li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--pq-gray-100);
    font-size: 0.88rem;
    line-height: 1.4;
}

.lanes-other-works li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lanes-work-year {
    display: block;
    font-size: 0.78rem;
    color: var(--pq-gray-500);
    margin-top: 0.15rem;
}

/* --- Sources List --- */
.lanes-sources-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lanes-sources-list li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--pq-gray-100);
    line-height: 1.4;
}

.lanes-sources-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lanes-sources-list strong.arabic-text {
    display: block;
    font-family: var(--font-arabic);
    font-size: 1.15rem;
    color: var(--pq-green-dark);
    direction: rtl;
    text-align: right;
    font-weight: 400;
}

.lanes-sources-list span {
    font-size: 0.82rem;
    color: var(--pq-gray-600);
}

/* --- Volumes Table --- */
.lanes-volumes-table-wrap {
    overflow-x: auto;
    margin: var(--space-md) 0 var(--space-lg);
}

.lanes-volumes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.lanes-volumes-table thead th {
    background: var(--pq-green-dark);
    color: var(--pq-white);
    padding: 0.65rem 0.85rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lanes-volumes-table thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.lanes-volumes-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.lanes-volumes-table tbody td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--pq-gray-100);
    color: var(--pq-gray-800);
}

.lanes-volumes-table tbody tr:hover {
    background: var(--pq-green-pale);
}

.lanes-volumes-table tbody td:first-child {
    font-weight: 600;
    color: var(--pq-green-dark);
    width: 70px;
}

.lanes-volumes-table tbody td:nth-child(2) {
    width: 100px;
    white-space: nowrap;
}

/* --- Export Bar (Lane's) --- */
.lanes-export-bar {
    margin-top: var(--space-xl);
}

/* --- Back Link --- */
.lanes-back-link {
    padding: var(--space-lg) 0 var(--space-2xl);
}

.lanes-return {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pq-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.lanes-return:hover {
    color: var(--pq-green-dark);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .lanes-bio-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .lanes-bio-sidebar {
        order: -1;
    }

    .lanes-bio-factbox {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 var(--space-lg);
    }

    .lanes-factbox-title {
        grid-column: 1 / -1;
    }

    .lanes-section-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 640px) {
    .lanes-hero {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }

    .lanes-hero-title {
        font-size: 1.65rem;
    }

    .lanes-hero-subtitle {
        font-size: 0.88rem;
    }

    .lanes-hero-ornament {
        font-size: 1.25rem;
    }

    .lanes-date-badge {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }

    .lanes-alphabet-grid--arabic {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: var(--space-sm);
    }

    .lanes-letter-ar {
        font-size: 1.7rem;
    }

    .lanes-letter-card {
        padding: 0.75rem 0.35rem;
    }

    .lanes-section-heading {
        font-size: 1.35rem;
    }

    .lanes-bio-card--highlight {
        padding: var(--space-md) 1.15rem;
    }

    .lanes-blockquote {
        font-size: 0.95rem;
    }

    .lanes-bio-factbox {
        grid-template-columns: 1fr;
    }

    .lanes-en-letter {
        min-width: 80px;
    }

    .lanes-bio-main p {
        font-size: 0.9rem;
    }

    .lanes-hero--compact {
        padding: var(--space-xl) var(--space-md) var(--space-lg);
    }

    .lanes-hero--compact .lanes-hero-title {
        font-size: 1.45rem;
    }

    .lanes-section-grid {
        gap: var(--space-sm);
    }

    .lanes-section-card {
        padding: var(--space-lg) var(--space-md);
    }
}

/* ==============================================
   Interlinear Standalone Page
   ============================================== */

/* --- Landing Page --- */
.interlinear-landing {
    padding: var(--space-xl) 0;
    max-width: 1000px;
    margin: 0 auto;
}

.interlinear-jump-box {
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.interlinear-jump-box h2 {
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-xs);
    font-size: 1.25rem;
}

.interlinear-jump-desc {
    color: var(--pq-gray-600);
    margin: 0 0 var(--space-md);
    font-size: 0.9rem;
}

.interlinear-jump-fields {
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
    flex-wrap: wrap;
}

.interlinear-jump-field {
    flex: 1;
    min-width: 180px;
}

.interlinear-jump-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pq-gray-700);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.interlinear-jump-field select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--pq-gray-300);
    border-radius: var(--radius-md, 8px);
    font-size: 0.9rem;
    background: var(--pq-white);
    color: var(--pq-gray-900);
}

.interlinear-jump-field select:focus {
    border-color: var(--pq-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.interlinear-jump-btn {
    padding: 0.6rem 1.5rem;
    background: var(--pq-green);
    color: var(--pq-white);
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.interlinear-jump-btn:hover:not(:disabled) {
    background: var(--pq-green-dark);
    transform: translateY(-1px);
}

.interlinear-jump-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Links */
.interlinear-quick-links {
    margin-bottom: var(--space-xl);
}

.interlinear-quick-links h3 {
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
    font-size: 1.1rem;
}

.interlinear-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-sm);
}

.interlinear-quick-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--pq-white);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.interlinear-quick-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.12);
    transform: translateY(-2px);
}

.iqc-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pq-green);
    margin-bottom: 0.25rem;
}

.iqc-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pq-green-dark);
}

.iqc-english {
    font-size: 0.8rem;
    color: var(--pq-gray-500);
    margin-top: 0.15rem;
}

/* Surah List */
.interlinear-surah-list h3 {
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
    font-size: 1.1rem;
}

/* --- Verse Page --- */
.interlinear-verse-page,
.lexicon-verse-page,
.arabic-verse-page {
    padding: 0 0 var(--space-xl);
}

.interlinear-verse-page .verse-page-layout,
.lexicon-verse-page .verse-page-layout,
.arabic-verse-page .verse-page-layout {
    padding-top: var(--space-lg);
}

/* --- Arabic Text Analysis Table (parallel study layout) --- */
.arabic-analysis-header {
    text-align: center;
    margin-top: var(--space-lg);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--pq-green, #2d5f2d);
}
.arabic-analysis-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pq-dark, #1a1a2e);
    margin: 0;
}
.arabic-analysis-ref {
    color: var(--pq-green, #2d5f2d);
    font-weight: 400;
    margin-left: 0.5em;
}
.arabic-analysis-subtitle {
    text-align: center;
    margin: var(--space-sm) 0 var(--space-md);
    font-size: 0.9rem;
    color: #666;
}
.arabic-analysis-subtitle a {
    color: var(--pq-green, #2d5f2d);
    text-decoration: none;
}
.arabic-analysis-subtitle a:hover {
    text-decoration: underline;
}
.arabic-table-wrap {
    overflow-x: auto;
    margin-top: var(--space-sm);
}
.arabic-analysis-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
    font-size: 0.95rem;
}
.arabic-col-headers {
    background: #f0f5f0;
}
.arabic-col-headers th {
    padding: 10px 14px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #c8d8c8;
    color: var(--pq-dark, #1a1a2e);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.arabic-col-arabic {
    text-align: right;
    min-width: 120px;
}
.arabic-col-lanes {
    min-width: 160px;
}
.arabic-col-english {
    min-width: 120px;
}
.arabic-col-morphology {
    min-width: 100px;
}
.arabic-row {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.15s ease;
}
.arabic-row:hover {
    background-color: #f8faf8;
}
.arabic-row:nth-child(even) {
    background-color: #fafcfa;
}
.arabic-row:nth-child(even):hover {
    background-color: #f0f5f0;
}
.arabic-cell {
    padding: 12px 14px;
    vertical-align: top;
    border-right: 1px solid #f0f0f0;
}
.arabic-cell:last-child {
    border-right: none;
}
.arabic-cell-arabic {
    text-align: right;
}
.arabic-word-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.arabic-word-link {
    font-size: 1.6rem;
    line-height: 1.4;
    color: var(--pq-dark, #1a1a2e);
    text-decoration: none;
    transition: color 0.2s;
}
.arabic-word-link:hover {
    color: var(--pq-green, #2d5f2d);
}
.arabic-translit {
    font-size: 0.8rem;
    color: var(--pq-green, #2d5f2d);
    font-style: italic;
    direction: ltr;
    text-align: right;
}
.arabic-english-word {
    color: #333;
}
.arabic-lanes-link {
    color: var(--pq-green, #2d5f2d);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}
.arabic-lanes-link:hover {
    text-decoration: underline;
}
.arabic-morphology-link {
    color: var(--pq-green, #2d5f2d);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
}
.arabic-morphology-link:hover {
    text-decoration: underline;
}
.arabic-empty {
    color: #ccc;
}
.arabic-verse-translation {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--pq-cream, #faf8f2);
    border-radius: 8px;
    border-left: 4px solid var(--pq-green, #2d5f2d);
}
.arabic-verse-translation-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin: 0 0 var(--space-xs);
}
.arabic-verse-translation-attr {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    font-style: italic;
}

/* Mobile: stack table if narrow */
@media (max-width: 640px) {
    .arabic-analysis-table {
        font-size: 0.85rem;
    }
    .arabic-col-headers th {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    .arabic-cell {
        padding: 8px 10px;
    }
    .arabic-word-link {
        font-size: 1.3rem;
    }
}

/* Sidebar link in Verse Info box */
.verse-info-link {
    color: var(--pq-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.verse-info-link:hover {
    color: var(--pq-gold);
}

.interlinear-verse-context {
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.il-verse-arabic {
    font-size: 2rem;
    line-height: 2;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-md);
}

.il-verse-translit {
    font-size: 1rem;
    color: var(--pq-green);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.il-verse-translation {
    font-size: 0.95rem;
    color: var(--pq-gray-700);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto var(--space-md);
}

.il-translator-name {
    font-weight: 600;
    color: var(--pq-gray-500);
    font-size: 0.85rem;
}

.il-verse-link {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--pq-gray-200);
}

.il-verse-link a {
    color: var(--pq-green);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.il-verse-link a:hover {
    color: var(--pq-gold);
}

/* --- Interlinear Cards --- */
.interlinear-cards-section {
    margin-bottom: var(--space-xl);
}

.interlinear-cards-section h2 {
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
    font-size: 1.25rem;
}

.interlinear-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    padding: 1.5rem;
    background: var(--pq-cream);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--pq-gray-200);
}

.il-card {
    text-align: center;
    padding: 1.25rem 1rem;
    background: var(--pq-white);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--pq-gray-200);
    min-width: 120px;
    max-width: 180px;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.il-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.12);
}

.il-card--linked {
    cursor: pointer;
}

.il-card--linked:hover {
    border-color: var(--pq-green);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.18);
}

/* Word position number */
.il-word-pos {
    position: absolute;
    top: 0.35rem;
    left: 0.5rem;
    font-size: 0.65rem;
    color: var(--pq-gray-400);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.il-arabic {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--pq-green-dark);
}

.il-arabic-link {
    color: inherit;
    text-decoration: none;
}

.il-arabic-link:hover {
    color: var(--pq-green);
}

.il-translit {
    font-size: 0.85rem;
    color: var(--pq-green);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.il-lemma {
    font-size: 0.72rem;
    color: var(--pq-gray-500);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.il-english {
    font-size: 0.85rem;
    color: var(--pq-gray-700);
    margin-bottom: 0.35rem;
    font-style: italic;
}

.il-root {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
    margin-bottom: 0.25rem;
}

.il-root-label {
    font-weight: 500;
}

.il-root a {
    color: var(--pq-green);
    text-decoration: none;
}

.il-root a:hover {
    color: var(--pq-gold);
}

.il-pos {
    font-size: 0.75rem;
    display: inline-block;
    margin-top: auto;
}

.il-pos:not(:has(.pq-pos-pill)) {
    color: var(--pq-white);
    background: var(--pq-green);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.il-irab {
    margin-top: 0.15rem;
}

.il-features {
    font-size: 0.7rem;
    color: var(--pq-gray-500);
    margin-top: 0.25rem;
}

.il-occ {
    font-size: 0.7rem;
    color: var(--pq-gray-400);
    background: var(--pq-gray-100);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-top: 0.25rem;
}

/* Ayah Picker */
.il-ayah-picker {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--pq-cream, #FAF7F0);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--pq-gray-200);
}

.il-ayah-picker label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-gray-700);
    white-space: nowrap;
}

.il-ayah-picker select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--pq-gray-300);
    border-radius: var(--radius-md, 8px);
    font-size: 0.85rem;
    background: var(--pq-white);
}

/* No data message */
.interlinear-no-data {
    padding: var(--space-xl);
    text-align: center;
    color: var(--pq-gray-500);
    background: var(--pq-cream, #FAF7F0);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--pq-gray-200);
    margin-bottom: var(--space-xl);
}

/* --- Interlinear Link Card on Verse Page --- */
.pq-interlinear-link-section {
    margin: 1.5rem 0;
}

.pq-interlinear-link-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-gray-200);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.pq-interlinear-link-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.12);
    transform: translateY(-1px);
}

.pq-il-link-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    color: var(--pq-green);
    font-weight: 600;
    letter-spacing: 0.1em;
}

.pq-il-link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pq-il-link-text strong {
    color: var(--pq-green-dark);
    font-size: 0.95rem;
}

.pq-il-link-text span {
    color: var(--pq-gray-600);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.pq-il-link-arrow {
    font-size: 1.25rem;
    color: var(--pq-green);
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .interlinear-jump-fields {
        flex-direction: column;
    }

    .interlinear-jump-field {
        min-width: 100%;
    }

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

    .il-card {
        min-width: 90px;
        max-width: 150px;
        padding: 0.75rem 0.5rem;
    }

    .il-arabic {
        font-size: 1.4rem;
    }

    .il-verse-arabic {
        font-size: 1.5rem;
    }

    .interlinear-cards {
        gap: 0.5rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .interlinear-quick-grid {
        grid-template-columns: 1fr;
    }
}

/* === Morphology Explorer — Root Detail Section === */

.pq-root-detail {
    margin-bottom: var(--space-2xl);
}

/* --- Overview (hero + stats) --- */
.pq-root-overview {
    margin-bottom: var(--space-xl);
}

.pq-root-hero-card {
    text-align: center;
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--pq-green-pale) 0%, var(--pq-cream) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
    margin-bottom: var(--space-lg);
}

.pq-root-hero-arabic {
    font-size: 4rem;
    line-height: 1.3;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-xs);
    text-align: center !important;
}

.pq-root-hero-translit {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--pq-green);
    margin-bottom: var(--space-xs);
}

.pq-root-hero-meaning {
    font-size: 1rem;
    color: var(--pq-gray-600);
}

.pq-root-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.pq-root-stat-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--pq-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
}

.pq-root-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    line-height: 1.2;
}

.pq-root-stat-label {
    font-size: 0.8125rem;
    color: var(--pq-gray-500);
    margin-top: var(--space-xs);
}

/* --- Word Breakdown --- */
.pq-root-breakdown {
    padding: var(--space-xl);
    background: var(--pq-gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
    margin-bottom: var(--space-xl);
}

.pq-root-breakdown h3 {
    color: var(--pq-green-dark);
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
}

.pq-root-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.pq-root-field {
    padding: var(--space-md);
    background: var(--pq-white);
    border-radius: var(--radius-md);
}

.pq-root-field--wide {
    grid-column: 1 / -1;
}

.pq-root-field-label {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.pq-root-field-value {
    font-size: 1.125rem;
    color: var(--pq-gray-800);
}

.pq-root-field-value.arabic-text {
    font-size: 1.5rem;
    color: var(--pq-green-dark);
}

.pq-root-features-code {
    font-size: 0.8125rem;
    padding: 2px var(--space-sm);
    background: var(--pq-green-pale);
    border-radius: var(--radius-sm);
    color: var(--pq-green-dark);
}

.pq-root-features-parsed {
    font-size: 0.875rem;
    color: var(--pq-gray-600);
    margin-left: var(--space-xs);
}

.pq-root-lemma-chip {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--pq-cream);
    border: 1px solid var(--pq-divider);
    border-radius: 999px;
    font-size: 1.125rem;
    margin: 2px;
}

/* --- POS Distribution --- */
.pq-root-pos-dist {
    margin-bottom: var(--space-xl);
}

.pq-root-pos-dist h3 {
    color: var(--pq-green-dark);
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.pq-root-pos-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.pq-root-pos-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: 999px;
    font-size: 0.875rem;
}

.pq-root-pos-count {
    color: var(--pq-gray-500);
    font-size: 0.8125rem;
}

/* --- Word Forms Gallery --- */
.pq-root-forms {
    margin-bottom: var(--space-xl);
}

.pq-root-forms h3 {
    color: var(--pq-green-dark);
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.pq-root-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-xs);
    background: var(--pq-green);
    color: var(--pq-white);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: var(--space-xs);
    vertical-align: middle;
}

.pq-root-forms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.pq-root-form-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--pq-cream);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-md);
}

.pq-root-form-chip .arabic-text {
    font-size: 1.25rem;
    color: var(--pq-green-dark);
}

.pq-root-form-freq {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pq-gray-500);
    background: var(--pq-white);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.pq-root-form-chip--more {
    color: var(--pq-gray-500);
    font-size: 0.875rem;
    background: var(--pq-gray-50);
}

/* --- Concordance Table --- */
.pq-root-concordance {
    margin-bottom: var(--space-xl);
}

.pq-root-concordance h3 {
    color: var(--pq-green-dark);
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.pq-root-concordance-intro {
    color: var(--pq-gray-600);
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

.pq-root-concordance-wrap {
    overflow-x: auto;
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
}

.pq-root-concordance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.pq-root-concordance-table thead {
    background: var(--pq-green-pale);
}

.pq-root-concordance-table th {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--pq-green-dark);
    border-bottom: 2px solid var(--pq-divider);
    white-space: nowrap;
}

.pq-root-concordance-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--pq-divider);
    vertical-align: middle;
}

.pq-root-concordance-table tbody tr:hover {
    background: var(--pq-cream);
}

.pq-conc-cell-ref a {
    font-weight: 600;
    color: var(--pq-green);
    text-decoration: none;
    white-space: nowrap;
}

.pq-conc-cell-ref a:hover {
    text-decoration: underline;
}

.pq-conc-cell-arabic {
    font-size: 1.25rem;
    white-space: nowrap;
}

.pq-conc-cell-translit {
    font-style: italic;
    color: var(--pq-gray-600);
    font-size: 0.875rem;
}

.pq-conc-cell-english {
    color: var(--pq-gray-700);
}

.pq-conc-morph-code {
    font-size: 0.75rem;
    padding: 2px var(--space-sm);
    background: var(--pq-green-pale);
    border-radius: var(--radius-sm);
    color: var(--pq-green-dark);
    white-space: nowrap;
}

.pq-conc-show-all-wrap {
    text-align: center;
    margin-top: var(--space-lg);
}

.pq-conc-show-all {
    background: var(--pq-green);
    color: var(--pq-white);
    border: none;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.pq-conc-show-all:hover {
    background: var(--pq-green-dark);
}

/* --- Back link --- */
.pq-root-back-link {
    text-align: center;
    margin-top: var(--space-lg);
}

.pq-root-back-link a {
    color: var(--pq-green);
    text-decoration: none;
    font-weight: 600;
}

.pq-root-back-link a:hover {
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .pq-root-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pq-root-breakdown-grid {
        grid-template-columns: 1fr;
    }
    .pq-root-hero-arabic {
        font-size: 2.5rem;
    }
    .pq-root-concordance-table th:nth-child(6),
    .pq-root-concordance-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 480px) {
    .pq-root-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pq-root-concordance-table th:nth-child(3),
    .pq-root-concordance-table td:nth-child(3),
    .pq-root-concordance-table th:nth-child(6),
    .pq-root-concordance-table td:nth-child(6) {
        display: none;
    }
}

/* === Parallel Translations Page === */

.parallel-verse-page .verse-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
    align-items: start;
}

.parallel-verse-heading {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--pq-divider);
}

.parallel-verse-heading h2 {
    font-size: 1.5rem;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-xs);
}

.parallel-verse-ref {
    color: var(--pq-green);
    font-weight: 400;
    margin-left: var(--space-xs);
}

.parallel-verse-links {
    font-size: 0.875rem;
    color: var(--pq-gray-500);
}

.parallel-verse-links a {
    color: var(--pq-green);
    text-decoration: none;
}

.parallel-verse-links a:hover {
    text-decoration: underline;
}

/* Arabic block at top */
.parallel-arabic-block {
    text-align: center;
    padding: var(--space-xl);
    background: var(--pq-cream);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

.parallel-arabic-text {
    font-size: 2.25rem;
    line-height: 2;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-sm);
}

.parallel-arabic-translit {
    font-style: italic;
    font-weight: 700;
    font-size: 1rem;
    color: var(--pq-gray-600);
}

/* Translations header with filter */
.parallel-translations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-green);
}

.parallel-translations-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--pq-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.parallel-filter-input {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--pq-gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    width: 200px;
    transition: border-color var(--transition-fast);
}

.parallel-filter-input:focus {
    outline: none;
    border-color: var(--pq-green);
    box-shadow: 0 0 0 2px rgba(26, 92, 58, 0.1);
}

/* Translation items — parallel study style stacked list */
.parallel-translations-list {
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.parallel-translation-item {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--pq-divider);
}

.parallel-translation-item:last-child {
    border-bottom: none;
}

.parallel-translation-item:hover {
    background: var(--pq-cream);
}

.parallel-translator-name {
    margin-bottom: var(--space-xs);
}

.parallel-translator-link {
    font-weight: 700;
    color: var(--pq-green);
    text-decoration: none;
    font-size: 0.9375rem;
}

.parallel-translator-link:hover {
    text-decoration: underline;
    color: var(--pq-green-dark);
}

.parallel-translation-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--pq-gray-700);
}

/* Responsive */
@media (max-width: 768px) {
    .parallel-verse-page .verse-page-layout {
        grid-template-columns: 1fr;
    }

    .parallel-filter-input {
        width: 140px;
    }

    .parallel-arabic-text {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Compare View — Side-by-Side Translation Comparison
   ========================================================================== */

/* Toggle bar */
.pq-compare-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--pq-gray-200, #e0e0e0);
}
.pq-compare-toggle-buttons {
    display: flex;
    gap: 0;
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}
.pq-compare-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--pq-white, #fff);
    color: var(--pq-gray-500, #757575);
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.pq-compare-toggle-btn + .pq-compare-toggle-btn {
    border-left: 1px solid var(--pq-gray-200, #e0e0e0);
}
.pq-compare-toggle-btn:hover {
    background: var(--pq-gray-50, #fafafa);
    color: var(--pq-green-dark, #1b4332);
}
.pq-compare-toggle-btn.active {
    background: var(--pq-green-dark, #1b4332);
    color: #fff;
}
.pq-compare-toggle-btn svg {
    flex-shrink: 0;
}

/* Compare selectors row */
.pq-compare-selectors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pq-compare-col-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.pq-compare-col-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-gray-400, #999);
}
.pq-compare-select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.8125rem;
    border: 1.5px solid var(--pq-green, #2e7d32);
    border-radius: var(--radius-sm, 6px);
    background: var(--pq-white, #fff);
    color: var(--pq-green-dark, #1b4332);
    font-weight: 500;
    cursor: pointer;
    appearance: auto;
    transition: border-color 0.15s;
}
.pq-compare-select:focus {
    outline: none;
    border-color: var(--pq-gold, #b8860b);
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.15);
}

/* Compare columns */
.pq-compare-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.pq-compare-card {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-gray-200, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.15s;
}
.pq-compare-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pq-compare-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.pq-compare-verse-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--pq-green, #2e7d32);
    border-radius: var(--radius-sm, 4px);
}
.pq-compare-translator-badge {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-green-dark, #1b4332);
}
.pq-compare-arabic {
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    line-height: 2;
    color: var(--pq-green-dark, #1b4332);
    text-align: right;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--pq-gray-100, #f0f0f0);
}
.pq-compare-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--pq-gray-700, #616161);
}

/* Responsive: stack columns on smaller screens */
@media (max-width: 1024px) {
    .pq-compare-selectors,
    .pq-compare-columns {
        grid-template-columns: 1fr;
    }
    .pq-compare-col-label {
        display: none;
    }
}

/* =================================================================
   Parallel Surah Page — Stacked + Compare views (chapter level)
   ================================================================= */

/* --- Stacked View: Ayah blocks --- */
.pq-parallel-ayah-block {
    background: #fff;
    border: 1px solid var(--pq-gray-100, #e8e8e8);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.pq-parallel-ayah-header {
    margin-bottom: 0.75rem;
}
.pq-parallel-ayah-ref {
    display: inline-block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pq-green-dark, #1b4332);
    background: var(--pq-green-50, #f0fdf4);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
}
.pq-parallel-ayah-ref:hover {
    background: var(--pq-green-100, #d1fae5);
}
.pq-parallel-ayah-arabic {
    font-size: 1.35rem;
    line-height: 2;
    color: var(--pq-gray-800, #333);
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--pq-gray-100, #f0f0f0);
}
.pq-parallel-stacked-translations .parallel-translation-item {
    border-bottom: 1px solid var(--pq-gray-50, #f5f5f5);
    padding: 0.5rem 0;
}
.pq-parallel-stacked-translations .parallel-translation-item:last-child {
    border-bottom: none;
}

/* --- Compare View: Sticky selectors bar --- */
.pq-compare-surah-selectors {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--pq-gray-100, #e8e8e8);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* --- Compare View: Ayah rows --- */
.pq-compare-ayah-row {
    background: #fff;
    border: 1px solid var(--pq-gray-100, #e8e8e8);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}
.pq-compare-ayah-header {
    margin-bottom: 0.5rem;
}
.pq-compare-ayah-ref {
    display: inline-block;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--pq-green-dark, #1b4332);
    background: var(--pq-green-50, #f0fdf4);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}
.pq-compare-ayah-ref:hover {
    background: var(--pq-green-100, #d1fae5);
}
.pq-compare-ayah-arabic {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--pq-gray-800, #333);
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--pq-gray-100, #f0f0f0);
}
.pq-compare-ayah-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.pq-compare-ayah-col {
    min-width: 0;
}
.pq-compare-ayah-col .pq-compare-translator-badge {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-green-dark, #1b4332);
    margin-bottom: 0.35rem;
}
.pq-compare-ayah-col .pq-compare-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--pq-gray-700, #616161);
}

/* Toggle bar surah variant — sticky below header */
.pq-compare-toggle-bar--surah {
    position: sticky;
    top: 0;
    z-index: 21;
    background: #fff;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pq-gray-100, #e8e8e8);
    margin-bottom: 1rem;
}

/* Responsive: stack compare columns */
@media (max-width: 900px) {
    .pq-compare-ayah-columns {
        grid-template-columns: 1fr;
    }
    .pq-compare-surah-selectors .pq-compare-selectors {
        grid-template-columns: 1fr;
    }
}

/* Compare All Translations link on main surah page */
.pq-parallel-surah-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-green-dark, #1b4332);
    background: var(--pq-green-50, #f0fdf4);
    border: 1px solid var(--pq-green-100, #d1fae5);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.pq-parallel-surah-link:hover {
    background: var(--pq-green-100, #d1fae5);
    border-color: var(--pq-green-200, #a7f3d0);
}
@media (max-width: 600px) {
    .pq-parallel-surah-link {
        margin-left: 0;
        margin-top: 0.5rem;
        display: flex;
        justify-content: center;
    }
}

/* =================================================================
   Concordance Enhancements — parallel-study
   ================================================================= */

/* --- Prev/Next Root Navigation (header) --- */
.pq-root-prevnext {
    max-width: 400px;
    margin: 0 auto;
}
.pq-root-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}
.pq-root-nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.pq-root-nav-arrow {
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 300;
}
.pq-root-nav-arabic {
    font-size: 1.1rem;
}

/* --- Morphology codes in concordance entries --- */
.concordance-morph-code {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--pq-gray-500, #888);
    background: var(--pq-gray-50, #f7f7f7);
    border: 1px solid var(--pq-gray-100, #eee);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.35rem;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

/* --- Multi-translation lines (multi-translation parallel style) --- */
.concordance-multi-trans {
    margin: 0.35rem 0 0.25rem;
    padding-left: 0;
}
.concordance-trans-line {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
    font-size: 0.84rem;
    line-height: 1.55;
    padding: 0.15rem 0;
}
.concordance-trans-label {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--pq-green-dark, #1b4332);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.concordance-trans-text {
    color: var(--pq-gray-700, #555);
}

/* --- Translation Rendering Tally --- */
.word-section--tally {
    /* inherits word-section styles */
}
.tally-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.tally-row {
    display: grid;
    grid-template-columns: minmax(80px, 160px) 1fr 40px;
    align-items: center;
    gap: 0.6rem;
}
.tally-gloss {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--pq-gray-800, #333);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tally-bar-wrap {
    height: 8px;
    background: var(--pq-gray-50, #f5f5f5);
    border-radius: 4px;
    overflow: hidden;
}
.tally-bar {
    height: 100%;
    background: var(--pq-green-dark, #1b4332);
    border-radius: 4px;
    transition: width 0.3s ease;
    min-width: 4px;
}
.tally-count {
    font-size: 0.78rem;
    color: var(--pq-gray-500, #888);
    text-align: right;
    font-weight: 600;
}
.tally-row--hidden {
    display: none;
}
.tally-total {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pq-gray-100, #eee);
    font-size: 0.82rem;
    color: var(--pq-gray-600, #666);
}
.tally-show-all {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pq-green-dark, #1b4332);
    background: var(--pq-green-50, #f0fdf4);
    border: 1px solid var(--pq-green-100, #dcfce7);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.tally-show-all:hover {
    background: var(--pq-green-100, #dcfce7);
}

/* --- Root tally rows (wider first column for Arabic + translit) --- */
.tally-row--root {
    grid-template-columns: minmax(120px, 240px) 1fr 40px;
}
.tally-gloss--root {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
    text-transform: none;
}
.tally-gloss--root:hover {
    color: var(--pq-green-dark, #1b4332);
}
.tally-root-arabic {
    font-size: 1.05rem;
    font-weight: 600;
}
.tally-root-translit {
    font-size: 0.78rem;
    color: var(--pq-gray-500, #888);
    font-style: italic;
}
.tally-root-meaning {
    font-size: 0.75rem;
    color: var(--pq-gray-400, #aaa);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.tally-bar--root {
    background: var(--pq-gold-dark, #92400e);
}

/* --- Thematic Index Tally (taxonomy-verse_theme.php) --- */
.theme-section--tally {
    margin-top: var(--space-lg, 2rem);
    padding-top: var(--space-md, 1.5rem);
    border-top: 2px solid var(--pq-gray-100, #eee);
}
.theme-tally-desc {
    font-size: 0.88rem;
    color: var(--pq-gray-600, #666);
    margin-bottom: 1.5rem;
    max-width: 600px;
}
.theme-tally-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .theme-tally-panels {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
.theme-tally-panel {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-gray-100, #eee);
    border-radius: 10px;
    padding: 1.25rem;
}
.theme-tally-panel-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pq-gray-800, #333);
    margin: 0 0 1rem;
}
.theme-tally-panel-title svg {
    color: var(--pq-green-dark, #1b4332);
    flex-shrink: 0;
}
.theme-tally-count {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--pq-gray-400, #aaa);
}

/* --- Related Roots sidebar --- */
.pq-related-roots-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pq-related-root-item {
    border-bottom: 1px solid var(--pq-gray-50, #f5f5f5);
}
.pq-related-root-item:last-child {
    border-bottom: none;
}
.pq-related-root-item a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0;
    text-decoration: none;
    color: var(--pq-gray-700, #555);
    font-size: 0.85rem;
    transition: background 0.1s;
}
.pq-related-root-item a:hover {
    color: var(--pq-green-dark, #1b4332);
}
.pq-related-root-arabic {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pq-gray-800, #333);
}
.pq-related-root-translit {
    font-size: 0.78rem;
    color: var(--pq-gray-400, #aaa);
}
.pq-related-root-meaning {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pq-related-root-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pq-gray-400, #aaa);
    flex-shrink: 0;
}

/* --- Responsive adjustments --- */
@media (max-width: 600px) {
    .concordance-trans-label {
        min-width: 70px;
        max-width: 90px;
        font-size: 0.68rem;
    }
    .tally-row {
        grid-template-columns: minmax(60px, 120px) 1fr 35px;
    }
    .pq-root-nav-arabic {
        font-size: 0.95rem;
    }
}

/* =================================================================
   ROOT TAB BAR — parallel-study navigation between root study pages
   ================================================================= */
.pq-root-tab-bar {
    background: var(--pq-gray-50, #f8f8f7);
    border-bottom: 1px solid var(--pq-gray-200, #e5e3df);
    padding: 0;
    margin-bottom: 0;
}
.pq-root-tab-bar-inner {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: 0 var(--space-md, 1.5rem);
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.pq-root-tab-bar-inner::-webkit-scrollbar { display: none; }

.pq-root-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pq-gray-500, #666);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
a.pq-root-tab:hover {
    color: var(--pq-green-700, #2d5a27);
    border-bottom-color: var(--pq-green-200, #c5ddc0);
}
.pq-root-tab--active {
    color: var(--pq-green-700, #2d5a27);
    border-bottom-color: var(--pq-green-600, #3a7a33);
    font-weight: 600;
}
.pq-root-tab-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
}
.pq-root-tab--active .pq-root-tab-icon { opacity: 1; }

@media (max-width: 600px) {
    .pq-root-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.78rem;
    }
    .pq-root-tab-label { display: none; }
    .pq-root-tab-icon { font-size: 1.1em; }
    .pq-root-tab--active .pq-root-tab-label { display: inline; }
}

/* =================================================================
   RESOURCE NAVIGATION SIDEBAR — "Study This Root" card
   ================================================================= */
.pq-resource-nav-card {
    padding-bottom: var(--space-xs, 0.5rem);
}
.pq-resource-nav-root {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-sm, 0.75rem);
    padding-bottom: var(--space-xs, 0.5rem);
    border-bottom: 1px solid var(--pq-gray-100, #eee);
}
.pq-resource-nav-root .arabic-text {
    font-size: 1.2rem;
}
.pq-resource-nav-translit {
    font-size: 0.82rem;
    color: var(--pq-gray-500, #666);
}
.pq-resource-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pq-resource-nav-item {
    border-bottom: 1px solid var(--pq-gray-50, #f5f5f3);
}
.pq-resource-nav-item:last-child { border-bottom: none; }
.pq-resource-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.25rem;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: background 0.15s;
}
a.pq-resource-nav-link:hover {
    background: var(--pq-gray-50, #f5f5f3);
}
.pq-resource-nav-link--current {
    background: var(--pq-green-50, #eef5ec);
    border-left: 3px solid var(--pq-green-600, #3a7a33);
    padding-left: 0.5rem;
    font-weight: 600;
}
.pq-resource-nav-icon {
    display: flex;
    align-items: center;
    color: var(--pq-green-600, #3a7a33);
    flex-shrink: 0;
}
.pq-resource-nav-text {
    flex: 1;
    min-width: 0;
}
.pq-resource-nav-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
}
.pq-resource-nav-desc {
    display: block;
    font-size: 0.72rem;
    color: var(--pq-gray-400, #999);
    line-height: 1.3;
}
.pq-resource-nav-arrow {
    color: var(--pq-gray-300, #ccc);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}
a.pq-resource-nav-link:hover .pq-resource-nav-arrow {
    color: var(--pq-green-600, #3a7a33);
    transform: translateX(2px);
}

/* =================================================================
   CONCORDANCE STATS BAR (standalone concordance page)
   ================================================================= */
.concordance-stats-bar {
    display: flex;
    gap: var(--space-md, 1.5rem);
    padding: var(--space-md, 1.5rem) 0;
    margin-bottom: var(--space-md, 1.5rem);
    border-bottom: 1px solid var(--pq-gray-100, #eee);
    flex-wrap: wrap;
}
.concordance-stat {
    text-align: center;
}
.concordance-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pq-green-700, #2d5a27);
    line-height: 1.2;
}
.concordance-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--pq-gray-400, #999);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =================================================================
   "SEE ALL" LINK — used on trimmed previews
   ================================================================= */
.pq-see-all-link-wrap {
    text-align: center;
    padding: var(--space-md, 1.5rem) 0;
    margin-top: var(--space-sm, 0.75rem);
}
.pq-see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.65rem 1.5rem;
    background: var(--pq-green-50, #eef5ec);
    color: var(--pq-green-700, #2d5a27);
    border: 1px solid var(--pq-green-200, #c5ddc0);
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.pq-see-all-link:hover {
    background: var(--pq-green-100, #d8ebd3);
    border-color: var(--pq-green-400, #6aad5f);
}

@media (max-width: 600px) {
    .concordance-stats-bar {
        gap: var(--space-sm, 0.75rem);
    }
    .concordance-stat-num {
        font-size: 1.2rem;
    }
    .pq-see-all-link {
        font-size: 0.82rem;
        padding: 0.5rem 1rem;
    }
}

/* ==========================================================================
   Verse Theme Page — Redesigned Header & Feature Highlights
   ========================================================================== */

/* Hero label (above title) */
.section-hero-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 var(--space-xs, 0.5rem);
}

/* Theme-specific hero overrides — match Quran page gold/white */
.section-hero--theme {
    background: linear-gradient(135deg, var(--pq-green-dark, #1b4332) 0%, #1a3a2a 50%, var(--pq-navy-dark, #0f2027) 100%);
    position: relative;
    overflow: hidden;
}

.section-hero--theme::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(30deg, var(--pq-gold, #c9a84c) 12%, transparent 12.5%, transparent 87%, var(--pq-gold, #c9a84c) 87.5%),
        linear-gradient(150deg, var(--pq-gold, #c9a84c) 12%, transparent 12.5%, transparent 87%, var(--pq-gold, #c9a84c) 87.5%);
    background-size: 40px 70px;
}

.section-hero--theme .section-hero-inner {
    position: relative;
    z-index: 1;
}

/* Feature Highlight Cards (below hero) */
.pq-theme-highlights {
    background: var(--pq-cream, #faf8f3);
    border-bottom: 1px solid var(--pq-divider, #e5e7eb);
    padding: var(--space-lg, 1.5rem) 0;
}

.pq-theme-highlight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
}

.pq-theme-highlight-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid var(--pq-divider, #e5e7eb);
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.pq-theme-highlight-card:hover {
    border-color: var(--pq-green, #2d6a4f);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.pq-theme-highlight-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--pq-green, #2d6a4f);
}

.pq-theme-highlight-body {
    min-width: 0;
}

.pq-theme-highlight-body strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1b4332);
    line-height: 1.3;
}

.pq-theme-highlight-body span {
    display: block;
    font-size: 0.75rem;
    color: var(--pq-gray-600, #6b7280);
    line-height: 1.4;
    margin-top: 2px;
}

/* Theme-item-ref styling (used in verse cards) */
.theme-item-ref {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pq-green, #2E7D32);
    background: rgba(45, 106, 79, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.theme-item-arabic {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--pq-gray-800, #333);
    margin-bottom: 4px;
}

.theme-item-english {
    font-size: 0.9375rem;
    color: var(--pq-gray-600, #6b7280);
    line-height: 1.6;
}

/* Indented sub-items in sidebar Quick Jump */
.sidebar-tool-item--indent {
    padding-left: 1.25rem;
    border-left: 2px solid var(--pq-divider, #e5e7eb);
    margin-left: 0.5rem;
}

.sidebar-tool-item--indent strong {
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Responsive: feature cards stack on mobile */
@media (max-width: 768px) {
    .pq-theme-highlight-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .pq-theme-highlight-cards {
        grid-template-columns: 1fr;
    }

    .pq-theme-highlight-body span {
        display: none;
    }
}


/* ── Morphological Grammar Key (legend) ── */
.pq-morph-legend {
    margin-bottom: var(--space-lg);
}
.pq-morph-legend-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--pq-green-pale);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    transition: background var(--transition-fast);
}
.pq-morph-legend-toggle:hover {
    background: var(--pq-green-lightest, #e8f5ee);
}
.pq-morph-legend-icon {
    font-size: 1.125rem;
    line-height: 1;
}
.pq-morph-legend-title {
    flex: 1;
    text-align: left;
}
.pq-morph-legend-arrow {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}
.pq-morph-legend--open .pq-morph-legend-arrow {
    transform: rotate(180deg);
}
.pq-morph-legend-body {
    display: none;
    padding: var(--space-md);
    border: 1px solid var(--pq-divider);
    border-top: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--pq-white);
    font-size: 0.8125rem;
}
.pq-morph-legend--open .pq-morph-legend-body {
    display: block;
}
.pq-morph-legend-section {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--pq-divider);
}
.pq-morph-legend-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.pq-morph-legend-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 var(--space-xxs, 4px) 0;
}
.pq-morph-legend-section dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px var(--space-sm);
    margin: 0;
}
.pq-morph-legend-section dt {
    font-weight: 600;
    color: var(--pq-gray-700);
    white-space: nowrap;
}
.pq-morph-legend-section dd {
    margin: 0;
    color: var(--pq-gray-500);
}

/* ── Features expanded inline ── */
.pq-features-expanded {
    font-size: 0.8125rem;
    color: var(--pq-gray-700);
    line-height: 1.4;
    cursor: help;
}


/* ── Word Form chips: transliteration + clickable ── */
a.pq-root-form-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast), transform 0.15s ease;
}
a.pq-root-form-chip:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.pq-root-form-translit {
    font-size: 0.6875rem;
    color: var(--pq-gray-500);
    font-style: italic;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Related Lemma chips: clickable hover ── */
a.pq-root-lemma-chip {
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
a.pq-root-lemma-chip:hover {
    background: var(--pq-green-pale);
    border-color: var(--pq-green);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ── Journey period stat: clickable hover ── */
a.journey-period-stat {
    cursor: pointer;
    transition: opacity var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: var(--space-xxs, 4px) var(--space-xs);
}
a.journey-period-stat:hover {
    opacity: 0.75;
    background: rgba(0,0,0,0.03);
}


/* ── Citation Panel ── */
.pq-citation-panel {
    display: none;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    background: var(--pq-cream, #faf7f2);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-md);
}
.pq-citation-panel.pq-citation--open {
    display: block;
}
.pq-citation-block {
    margin-bottom: var(--space-sm);
    padding: var(--space-sm);
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-sm);
    position: relative;
}
.pq-citation-block:last-of-type {
    margin-bottom: 0;
}
.pq-citation-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.pq-citation-text {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--pq-gray-700);
    padding-right: 60px;
    word-break: break-word;
}
.pq-citation-copy {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: 0.6875rem;
    padding: 2px 8px;
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-sm);
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-fast);
}
.pq-citation-copy:hover {
    background: var(--pq-green-lightest, #e8f5ee);
}

/* ── Scholar toolbar button hover ── */
.pq-scholar-toolbar button:hover {
    border-color: var(--pq-green);
    background: var(--pq-green-lightest, #e8f5ee) !important;
}


/* ═══════════════════════════════════════════════════════════════
   CONCORDANCE LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */

.conc-landing {
    --conc-green: var(--pq-green, #2a6e4e);
    --conc-green-dark: var(--pq-green-dark, #1a4a32);
    --conc-green-pale: var(--pq-green-pale, #f0faf4);
    --conc-cream: var(--pq-cream, #faf7f2);
    --conc-gold: var(--pq-gold, #c08b5c);
}

/* ── Hero ── */
.conc-landing-hero {
    background: linear-gradient(135deg, var(--conc-green-dark) 0%, var(--conc-green) 60%, #3a7a5e 100%);
    color: var(--pq-white, #fff);
    padding: var(--space-3xl, 3rem) 0 var(--space-2xl, 2rem);
    text-align: center;
}
.conc-landing-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 var(--space-sm) 0;
    color: var(--pq-white, #fff);
    letter-spacing: -0.01em;
}
.conc-landing-subtitle {
    max-width: 680px;
    margin: 0 auto var(--space-lg);
    font-size: 1.0625rem;
    line-height: 1.7;
    opacity: 0.92;
}

/* ── Search box ── */
.conc-landing-search {
    max-width: 560px;
    margin: 0 auto var(--space-xl);
}
.conc-search-wrap {
    display: flex;
    background: var(--pq-white, #fff);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.conc-search-input {
    flex: 1;
    border: 0;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.conc-search-input::placeholder {
    color: var(--pq-gray-400, #aaa);
}
.conc-search-btn {
    padding: var(--space-md) var(--space-xl);
    background: var(--conc-green);
    color: var(--pq-white, #fff);
    border: 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.conc-search-btn:hover {
    background: var(--conc-green-dark);
}

/* ── Stats bar ── */
.conc-landing-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}
.conc-landing-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.conc-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pq-white, #fff);
}
.conc-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
    margin-top: 2px;
}

/* ── Section defaults ── */
.conc-landing-section {
    padding: var(--space-2xl, 2rem) 0;
}
.conc-landing-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--conc-green-dark);
    margin: 0 0 var(--space-xs) 0;
    text-align: center;
}
.conc-section-desc {
    text-align: center;
    color: var(--pq-gray-600, #666);
    max-width: 640px;
    margin: 0 auto var(--space-lg);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ── Explanation (what is a concordance) ── */
.conc-landing-explanation {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
    align-items: start;
}
.conc-explain-main p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--pq-gray-700, #444);
    margin: 0 0 var(--space-md) 0;
}
.conc-explain-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.conc-explain-card {
    background: var(--conc-green-pale);
    border: 1px solid var(--pq-divider, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-md);
}
.conc-explain-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--conc-green-dark);
    margin: 0 0 var(--space-xs) 0;
}
.conc-explain-card ol,
.conc-explain-card ul {
    margin: 0;
    padding-left: var(--space-lg);
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--pq-gray-700, #444);
}
.conc-explain-card li {
    margin-bottom: var(--space-xxs, 4px);
}

/* ── Letter grid ── */
.conc-landing-letters-section {
    background: var(--conc-cream);
}
.conc-letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    max-width: 900px;
    margin: 0 auto;
}
.conc-letter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md) var(--space-sm);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.conc-letter-card:hover {
    border-color: var(--conc-green);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.conc-letter-card--empty {
    opacity: 0.3;
    pointer-events: none;
}
.conc-letter-arabic {
    font-size: 2rem;
    font-family: var(--font-arabic, 'Amiri', serif);
    color: var(--conc-green-dark);
    line-height: 1.2;
}
.conc-letter-name {
    font-size: 0.6875rem;
    color: var(--pq-gray-500, #888);
    margin-top: 2px;
    font-style: italic;
}
.conc-letter-count {
    font-size: 0.6875rem;
    color: var(--conc-green);
    font-weight: 600;
    margin-top: var(--space-xxs, 4px);
}

/* ── Top roots grid ── */
.conc-top-roots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-sm);
}
.conc-top-root-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.conc-top-root-card:hover {
    border-color: var(--conc-green);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.conc-top-root-rank {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 0.6875rem;
    color: var(--pq-gray-400, #bbb);
    font-weight: 700;
}
.conc-top-root-arabic {
    font-size: 1.5rem;
    font-family: var(--font-arabic, 'Amiri', serif);
    color: var(--conc-green-dark);
}
.conc-top-root-translit {
    font-size: 0.8125rem;
    color: var(--pq-gray-500, #888);
    font-style: italic;
    margin-top: 2px;
}
.conc-top-root-freq {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--conc-green);
    margin-top: var(--space-xxs, 4px);
}
.conc-top-root-meaning {
    font-size: 0.75rem;
    color: var(--pq-gray-600, #666);
    line-height: 1.5;
    margin-top: var(--space-xxs, 4px);
}

/* ── Sources grid ── */
.conc-landing-sources-section {
    background: var(--conc-cream);
}
.conc-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}
.conc-source-card {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-md);
}
.conc-source-card h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--conc-green-dark);
    margin: 0 0 var(--space-xxs, 4px) 0;
}
.conc-source-card h4 a {
    color: var(--conc-green-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.conc-source-card h4 a:hover {
    color: var(--conc-green);
}
.conc-source-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--conc-gold);
    margin: 0 0 var(--space-xs) 0;
}
.conc-source-card p:last-child {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--pq-gray-600, #666);
    margin: 0;
}

/* ── CTA section ── */
.conc-landing-cta {
    padding-bottom: var(--space-3xl, 3rem);
}
.conc-cta-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}
.conc-cta-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e5e5e5);
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.875rem;
}
.conc-cta-chip:hover {
    border-color: var(--conc-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.conc-cta-chip .arabic-text {
    font-size: 1.25rem;
    color: var(--conc-green-dark);
}
.conc-btn-primary {
    display: inline-block;
    padding: var(--space-sm) var(--space-xl);
    background: var(--conc-green);
    color: var(--pq-white, #fff);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s;
}
.conc-btn-primary:hover {
    background: var(--conc-green-dark);
    color: var(--pq-white, #fff);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .conc-landing-explanation {
        grid-template-columns: 1fr;
    }
    .conc-letter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .conc-landing-stats {
        gap: var(--space-md);
    }
    .conc-stat-num {
        font-size: 1.25rem;
    }
    .conc-sources-grid {
        grid-template-columns: 1fr;
    }
    .conc-top-roots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Header Dropdown Navigation (Language Tools)
   ========================================================================== */

/* Desktop dropdown */
.menu-item-has-children {
    position: relative;
}
.menu-item-has-children > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: var(--space-xs, 0.375rem) 0;
    z-index: 1000;
    list-style: none;
    margin: 0;
}
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
    display: block;
}
.menu-item-has-children > .sub-menu li {
    margin: 0;
}
.menu-item-has-children > .sub-menu li a {
    display: block;
    padding: 0.5rem 1.125rem;
    color: var(--pq-text, #1a1a1a);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.menu-item-has-children > .sub-menu li a:hover,
.menu-item-has-children > .sub-menu li a:focus {
    background: var(--pq-green-pale, #E8F5E9);
    color: var(--pq-green-dark, #1B5E20);
}

/* Dropdown arrow indicator on parent item */
.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.375rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
}

/* Mobile — stack dropdown normally */
@media (max-width: 768px) {
    .menu-item-has-children > .sub-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.06);
        padding: 0;
        display: none;
    }
    .menu-item-has-children:hover > .sub-menu,
    .menu-item-has-children:focus-within > .sub-menu,
    .main-navigation.toggled .menu-item-has-children > .sub-menu {
        display: block;
    }
    .menu-item-has-children > .sub-menu li a {
        padding-left: 2rem;
        color: rgba(255,255,255,0.85);
        font-size: 0.8125rem;
    }
    .menu-item-has-children > .sub-menu li a:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
}

/* ==========================================================================
   Language Tools Landing Page
   ========================================================================== */

.lt-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-2xl, 2.5rem);
}

.lt-tool-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-lg, 1.5rem);
    background: #fff;
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    color: var(--pq-text, #1a1a1a);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.lt-tool-card:hover {
    border-color: var(--pq-green, #2E7D32);
    box-shadow: 0 4px 16px rgba(46,125,50,0.12);
    transform: translateY(-2px);
}

.lt-tool-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pq-green-pale, #E8F5E9);
    border-radius: var(--radius-md, 8px);
    color: var(--pq-green-dark, #1B5E20);
    margin-bottom: var(--space-md, 1rem);
}

.lt-tool-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0 0 var(--space-xs, 0.375rem);
}

.lt-tool-card p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--pq-gray-600, #666);
    margin: 0;
    flex: 1;
}

.lt-tool-meta {
    display: inline-block;
    margin-top: var(--space-sm, 0.625rem);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Transliteration note */
.lt-translit-note {
    background: var(--pq-cream, #faf8f3);
    border: 1px solid var(--pq-gold, #c9a84c);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    margin-bottom: var(--space-2xl, 2.5rem);
    font-size: 0.9375rem;
    color: var(--pq-green-dark, #1B5E20);
    line-height: 1.6;
}
.lt-translit-note p {
    margin: 0;
}
.lt-translit-note strong {
    color: var(--pq-gold-dark, #C5A55A);
}

/* Stats row */
.lt-stats-row {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl, 2.5rem);
    padding: var(--space-xl, 2rem) 0;
    border-top: 1px solid var(--pq-divider, #e0e0e0);
}
.lt-stat {
    text-align: center;
}
.lt-stat-num {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
}
.lt-stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #666);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 900px) {
    .lt-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .lt-tools-grid {
        grid-template-columns: 1fr;
    }
    .lt-stats-row {
        flex-wrap: wrap;
        gap: var(--space-lg, 1.5rem);
    }
    .lt-stat {
        flex: 0 0 45%;
    }
}

/* ==========================================================================
   Today in Islam Widget + Hadith of the Day
   ========================================================================== */

/* --- Today in Islam card --- */
.pq-today-islam-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.pq-today-islam-card .sidebar-section-title {
    margin-bottom: var(--space-md);
}

/* Date display */
.pq-today-dates {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--pq-divider);
}

.pq-today-gregorian {
    font-size: 0.9rem;
    color: var(--pq-charcoal);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.pq-today-greg-icon {
    font-size: 1.15em;
    line-height: 1;
    display: inline-block;
}

.pq-today-hijri {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.pq-hijri-arabic {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.1rem;
    color: var(--pq-green-dark);
    direction: rtl;
}

.pq-hijri-text {
    font-size: 0.9rem;
    color: var(--pq-green-dark);
    font-weight: 600;
}

/* Calendar action buttons */
.pq-today-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.pq-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pq-green-dark);
    background: var(--pq-green-pale, #E8F5E9);
    border: 1px solid var(--pq-green-dark);
    border-radius: 999px;
    text-decoration: none;
    transition: all 200ms ease;
    cursor: pointer;
    font-family: var(--font-body);
}

.pq-today-btn:hover {
    background: var(--pq-green-dark);
    color: #fff;
}

/* Context badges */
.pq-today-context {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.pq-context-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md, 8px);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--pq-charcoal);
}

.pq-context-badge a {
    color: var(--pq-green-dark);
    font-weight: 600;
    text-decoration: none;
}

.pq-context-badge a:hover {
    text-decoration: underline;
}

.pq-badge-sacred {
    background: #FFF8E1;
    border-left: 3px solid var(--pq-gold);
}

.pq-badge-white {
    background: #F3E5F5;
    border-left: 3px solid #9C27B0;
}

.pq-badge-fast {
    background: #E8F5E9;
    border-left: 3px solid var(--pq-green-dark);
}

.pq-badge-warning {
    background: #FFF3E0;
    border-left: 3px solid #E65100;
    font-weight: 600;
}

.pq-badge-ramadan {
    background: #E3F2FD;
    border-left: 3px solid #1565C0;
}

.pq-badge-shawwal {
    background: #E8F5E9;
    border-left: 3px solid var(--pq-green-dark);
}

.pq-badge-dhul-hijjah {
    background: #FFF8E1;
    border-left: 3px solid var(--pq-gold);
}

.pq-badge-letter {
    background: #FCE4EC;
    border-left: 3px solid #C62828;
}

/* Upcoming events */
.pq-today-upcoming {
    margin-bottom: var(--space-md);
}

.pq-today-upcoming h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-gray-600);
    margin: 0 0 var(--space-xs);
}

.pq-upcoming-event {
    display: block;
    padding: var(--space-xs) 0;
    text-decoration: none;
    border-bottom: 1px solid var(--pq-divider);
}

.pq-upcoming-event:last-child {
    border-bottom: none;
}

.pq-upcoming-event strong {
    display: block;
    font-size: 0.85rem;
    color: var(--pq-charcoal);
}

.pq-upcoming-event span {
    display: block;
    font-size: 0.75rem;
    color: var(--pq-gray-600);
    margin-top: 1px;
}

.pq-upcoming-event:hover strong {
    color: var(--pq-green-dark);
}

/* Calendar page link */
.pq-today-calendar-link {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    text-decoration: none;
    padding: var(--space-sm);
    background: var(--pq-green-pale, #E8F5E9);
    border-radius: var(--radius-md, 8px);
    transition: all 200ms ease;
}

.pq-today-calendar-link:hover {
    background: var(--pq-green-dark);
    color: #fff;
}

/* Today in Islam — clickable title and dates */
.pq-today-title-link {
    text-decoration: none;
    display: block;
}

.pq-today-title-link:hover .sidebar-section-title {
    color: var(--pq-green-dark);
    text-decoration: underline;
}

.pq-today-dates-link {
    display: block;
    text-decoration: none;
    border-radius: var(--radius-md, 8px);
    padding: var(--space-xs);
    margin: 0 calc(-1 * var(--space-xs)) var(--space-sm);
    transition: background 150ms ease;
}

.pq-today-dates-link:hover {
    background: var(--pq-green-pale);
}

.pq-today-dates-link .pq-today-gregorian,
.pq-today-dates-link .pq-today-hijri {
    color: inherit;
}

/* Upcoming voluntary fasts */
.pq-today-upcoming-fasts {
    margin-bottom: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--pq-divider);
}

.pq-today-upcoming-fasts .pq-upcoming-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pq-gray-600);
    margin: 0 0 var(--space-xs);
}

.pq-upcoming-fast-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--pq-divider);
    font-size: 0.82rem;
}

.pq-upcoming-fast-item:last-child {
    border-bottom: none;
}

.pq-upcoming-fast-item strong {
    color: var(--pq-charcoal);
    min-width: 70px;
}

.pq-upcoming-fast-item span {
    color: var(--pq-gray-600);
}

.pq-fast-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: auto;
}

/* --- Hadith of the Day card --- */
.pq-hadith-day-card {
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.pq-hadith-day-card .sidebar-section-title {
    margin-bottom: var(--space-md);
}

.pq-hadith-day-text {
    margin: 0 0 var(--space-sm);
    padding: 0;
    border: none;
}

.pq-hadith-en {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--pq-charcoal);
    font-style: italic;
    margin: 0 0 var(--space-xs);
}

.pq-hadith-ar {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--pq-green-dark);
    margin: var(--space-xs) 0 0;
}

.pq-hadith-day-source {
    display: block;
    font-size: 0.75rem;
    color: var(--pq-gray-600);
    font-style: normal;
}

.pq-hadith-day-source a {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-weight: 600;
}

.pq-hadith-day-source a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Islamic Calendar Page — Redesigned
   ========================================================================== */

.pq-ical-page {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

/* Page header */
.pq-ical-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.pq-ical-header h1 {
    font-size: 2rem;
    color: var(--pq-green-dark);
    margin-bottom: var(--space-xs);
}

.pq-ical-subtitle {
    font-size: 1rem;
    color: var(--pq-gray-600);
}

/* ── Top panels: Subscribe + About side by side ── */
.pq-ical-top-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.pq-ical-subscribe-panel,
.pq-ical-about-panel {
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.pq-ical-panel-heading {
    font-size: 1.25rem;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--pq-gold);
}

.pq-ical-subscribe-panel p {
    font-size: 0.9rem;
    color: var(--pq-charcoal);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.pq-ical-subscribe-btns {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.pq-ical-subscribe-note {
    font-size: 0.78rem;
    color: var(--pq-gray-600);
    line-height: 1.5;
}

/* Info accordion panels inside About */
.pq-ical-about-panel .pq-info-panel {
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-md, 8px);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.pq-ical-about-panel .pq-info-panel summary {
    padding: var(--space-sm) var(--space-md);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--pq-charcoal);
    cursor: pointer;
    background: var(--pq-cream);
    transition: background 200ms ease;
    list-style: none;
}

.pq-ical-about-panel .pq-info-panel summary::-webkit-details-marker {
    display: none;
}

.pq-ical-about-panel .pq-info-panel summary::before {
    content: '▸ ';
    color: var(--pq-green-dark);
    font-size: 0.9em;
}

.pq-ical-about-panel .pq-info-panel[open] summary::before {
    content: '▾ ';
}

.pq-ical-about-panel .pq-info-panel summary:hover {
    background: var(--pq-green-pale);
}

.pq-ical-about-panel .pq-info-content {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--pq-charcoal);
}

.pq-ical-about-panel .pq-info-content ul {
    padding-left: var(--space-lg);
    margin: var(--space-sm) 0;
}

.pq-ical-about-panel .pq-info-content li {
    margin-bottom: var(--space-xs);
}

/* ── Today's date — clickable bar ── */
.pq-ical-today {
    margin-bottom: var(--space-xl);
}

.pq-ical-today-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--pq-green-pale);
    border: 2px solid var(--pq-green-dark);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 200ms ease;
}

.pq-ical-today-link.pq-scrollable {
    cursor: pointer;
}

.pq-ical-today-link.pq-scrollable:hover {
    background: var(--pq-green-dark);
}

.pq-ical-today-link.pq-scrollable:hover .pq-ical-today-label,
.pq-ical-today-link.pq-scrollable:hover .pq-ical-today-greg,
.pq-ical-today-link.pq-scrollable:hover .pq-ical-today-hijri {
    color: #fff;
}

.pq-ical-today-link.pq-scrollable:hover .pq-ical-today-ar {
    color: var(--pq-gold-light);
}

.pq-ical-today-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--pq-green-dark);
    background: var(--pq-white);
    padding: 2px 12px;
    border-radius: 999px;
    border: 1px solid var(--pq-green-dark);
}

.pq-ical-today-dates {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.pq-ical-today-greg {
    font-size: 1rem;
    color: var(--pq-charcoal);
}

.pq-ical-today-ar {
    font-family: var(--font-arabic);
    font-size: 1.3rem;
    color: var(--pq-green-dark);
}

.pq-ical-today-hijri {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pq-green-dark);
}

/* ── Year navigation ── */
.pq-ical-year-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--pq-cream);
    border-radius: var(--radius-lg);
    border: 1px solid var(--pq-divider);
}

.pq-ical-year-link {
    font-size: 0.9rem;
    color: var(--pq-green-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 150ms ease;
}

.pq-ical-year-link:hover {
    text-decoration: underline;
}

.pq-ical-year-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pq-charcoal);
}

/* ── Export bar ── */
.pq-ical-export-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-lg);
}

.pq-ical-export-dropdown {
    position: relative;
}

.pq-ical-export-trigger {
    font-size: 0.85rem;
}

.pq-ical-export-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--pq-white);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 100;
    padding: var(--space-xs) 0;
}

.pq-ical-export-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--space-xs) var(--space-md);
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--pq-charcoal);
    cursor: pointer;
    transition: background 100ms ease;
}

.pq-ical-export-menu button:hover {
    background: var(--pq-green-pale);
    color: var(--pq-green-dark);
}

/* ── Month sections — two-column layout ── */
.pq-ical-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.pq-ical-month {
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--pq-white);
}

.pq-ical-month--current {
    border-color: var(--pq-green-dark);
    box-shadow: 0 0 0 2px var(--pq-green-pale);
}

.pq-ical-month-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--pq-green-dark);
    color: #fff;
    font-size: 0.95rem;
}

.pq-ical-month-header.pq-sacred-month {
    background: linear-gradient(135deg, var(--pq-green-dark), #2E7D32);
    border-bottom: 3px solid var(--pq-gold);
}

.pq-ical-month-number {
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0.8;
    min-width: 2ch;
}

.pq-ical-month-english {
    font-size: 1.05rem;
    font-weight: 700;
}

/* v2.66.48: Group English month name with Gregorian date span stacked beneath */
.pq-ical-month-name-group {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    gap: 2px;
}

.pq-ical-month-greg-span {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.75;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pq-ical-month-arabic {
    font-family: var(--font-arabic);
    font-size: 1.3rem;
    margin-left: auto;
}

.pq-sacred-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--pq-gold);
    color: var(--pq-green-dark);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pq-current-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #fff;
    color: var(--pq-green-dark);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* v15: rolling-12-month additions */
.pq-ical-month-year {
    display: inline-block;
    margin-left: auto;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.pq-ical-year-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0 6px;
    position: relative;
}
.pq-ical-year-divider::before,
.pq-ical-year-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--pq-green-dark, #1f6b40), transparent);
    opacity: 0.35;
}
.pq-ical-year-divider-label {
    margin: 0 14px;
    padding: 4px 14px;
    background: var(--pq-cream, #fbf6e9);
    color: var(--pq-green-dark, #1f6b40);
    border: 1px solid rgba(31, 107, 64, 0.25);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Month body: two columns */
.pq-ical-month-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.pq-ical-month-info {
    padding: var(--space-lg);
    border-right: 1px solid var(--pq-divider);
}

.pq-ical-month-translit {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--pq-gray-600);
    margin: 0 0 var(--space-sm);
}

.pq-ical-month-meta {
    font-size: 0.82rem;
    color: var(--pq-gray-600);
    line-height: 1.6;
    margin: 0;
}

.pq-ical-month-note {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--pq-cream);
    border-left: 3px solid var(--pq-gold);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.82rem;
    color: var(--pq-charcoal);
    line-height: 1.5;
}

/* Weekly fasts section inside month left column */
.pq-ical-weekly-fasts {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--pq-divider);
}

.pq-ical-fasts-heading {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pq-forest);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 var(--space-xs) 0;
}

.pq-ical-fasts-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pq-ical-fast-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 3px 0;
}

.pq-ical-fast-day {
    font-weight: 600;
    color: var(--pq-charcoal);
    min-width: 72px;
}

.pq-ical-fast-date {
    color: var(--pq-text-muted);
}

.pq-ical-fast-label {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--pq-forest);
    background: rgba(27, 94, 32, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-sm, 4px);
}

/* Events column (right side) */
.pq-ical-month-events {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.pq-ical-event-card {
    background: var(--pq-cream);
    border: 1px solid var(--pq-divider);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-sm) var(--space-md);
    transition: border-color 200ms ease;
}

.pq-ical-event-card:hover {
    border-color: var(--pq-green-dark);
}

.pq-ical-event-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.pq-ical-event-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--pq-charcoal);
    text-decoration: none;
}

a.pq-ical-event-name:hover {
    color: var(--pq-green-dark);
}

/* Category badges */
.pq-ev-cat {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.pq-ev-cat--holiday {
    background: #E8F5E9;
    color: var(--pq-green-dark);
}

.pq-ev-cat--observance {
    background: #E3F2FD;
    color: #1565C0;
}

.pq-ev-cat--pillar {
    background: #FFF8E1;
    color: #F57F17;
}

.pq-ical-event-names {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.pq-ical-event-ar {
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    color: var(--pq-green-dark);
}

.pq-ical-event-translit {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--pq-gray-600);
}

.pq-ical-event-dates {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: 2px;
}

.pq-ical-event-hijri-date {
    font-size: 0.82rem;
    color: var(--pq-charcoal);
    font-weight: 600;
}

.pq-ical-event-greg-date {
    font-size: 0.78rem;
    color: var(--pq-gray-600);
    font-style: italic;
}

.pq-ical-event-desc {
    font-size: 0.8rem;
    color: var(--pq-gray-600);
    line-height: 1.5;
    margin: 2px 0 0;
}

.pq-ical-event-notice {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #C62828;
    background: #FFEBEE;
    padding: 1px 8px;
    border-radius: 999px;
    margin-top: 4px;
}
/* v2.66.22 -- fasting-status variants on the calendar event card */
.pq-ical-event-notice--prohibited {
    color: #C62828;
    background: #FFEBEE;
}
.pq-ical-event-notice--recommended {
    color: #1B5E20;
    background: #E8F5E9;
}
.pq-ical-event-notice--optional {
    color: #8D6E00;
    background: #FFF8E1;
}
.pq-ical-event-notice--mandatory {
    color: #FFFFFF;
    background: #2E7D32;
}

.pq-ical-event-actions {
    margin-top: var(--space-xs);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Pill buttons in the event card action row (v15a-fix) */
.pq-ical-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}
.pq-ical-pill--cal {
    background: var(--pq-cream, #fbf6e9);
    color: var(--pq-green-dark, #1f6b40);
    border-color: rgba(31, 107, 64, 0.35);
}
.pq-ical-pill--cal:hover,
.pq-ical-pill--cal:focus {
    background: #fff;
    border-color: var(--pq-green-dark, #1f6b40);
    color: var(--pq-green-dark, #1f6b40);
    text-decoration: none;
}
.pq-ical-pill--readmore {
    background: var(--pq-green-dark, #1f6b40);
    color: #fff;
    border-color: var(--pq-green-dark, #1f6b40);
}
.pq-ical-pill--readmore:hover,
.pq-ical-pill--readmore:focus {
    background: #18553a;
    border-color: #18553a;
    color: #fff;
    text-decoration: none;
}

/* v2.66.48: Pill that wraps a native <select> for Export Year picker.
 * The label is the pill chrome; the <select> sits invisibly on top so the
 * native dropdown opens on click but the styling looks like the other pills. */
.pq-ical-pill--select {
    position: relative;
    cursor: pointer;
    padding-right: 26px;
    gap: 4px;
}
.pq-ical-pill--select:hover,
.pq-ical-pill--select:focus-within {
    background: #fff;
    border-color: var(--pq-green-dark, #1f6b40);
    color: var(--pq-green-dark, #1f6b40);
}
.pq-ical-pill-select-label {
    font-weight: 600;
}
.pq-ical-pill-select-control {
    /* Native select layered on top of the entire pill - invisible but clickable.
     * This preserves the native dropdown UI (which is impossible to fully style) */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
}
.pq-ical-pill-select-control:focus {
    outline: none;
}
.pq-ical-pill-select-caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    opacity: 0.8;
    pointer-events: none;
}

.pq-ical-no-events {
    font-size: 0.85rem;
    color: var(--pq-gray-600);
    font-style: italic;
    margin: 0;
    padding: var(--space-sm) 0;
}

/* ── Disclaimer ── */
.pq-ical-disclaimer {
    margin: var(--space-xl) 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--pq-cream);
    border-radius: var(--radius-md, 8px);
    border-left: 3px solid var(--pq-gold);
}

.pq-ical-disclaimer p {
    font-size: 0.82rem;
    color: var(--pq-gray-600);
    line-height: 1.6;
    margin: 0;
}

/* ── Footer nav ── */
.pq-ical-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--pq-divider);
    margin-top: var(--space-lg);
}

.pq-back-top {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    text-decoration: none;
}

.pq-back-top:hover {
    text-decoration: underline;
}

.pq-ical-footer-months {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.pq-ical-footer-months a {
    font-size: 0.75rem;
    color: var(--pq-green-dark);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--pq-green-pale);
    transition: all 150ms ease;
}

.pq-ical-footer-months a:hover {
    background: var(--pq-green-dark);
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .pq-ical-top-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pq-ical-month-body {
        grid-template-columns: 1fr;
    }

    .pq-ical-month-info {
        border-right: none;
        border-bottom: 1px solid var(--pq-divider);
        padding-bottom: var(--space-md);
    }

    .pq-ical-today-link {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .pq-ical-today-dates {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .pq-ical-year-nav {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .pq-ical-month-header {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .pq-ical-month-arabic {
        margin-left: 0;
    }

    .pq-ical-subscribe-btns {
        flex-direction: column;
    }

    .pq-ical-footer-months {
        justify-content: center;
    }
}

/* ==========================================================================
   Single Islamic Event Page (matches women-in-islam profile styling)
   ========================================================================== */

.pq-event-single {
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-3xl);
}

/* Breadcrumb */
.pq-event-back {
    margin-bottom: var(--space-xl);
    font-size: 0.8125rem;
}
.pq-event-back a {
    color: var(--pq-green-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.pq-event-back a:hover {
    color: var(--pq-green);
    text-decoration: underline;
}

/* Header */
.pq-event-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}
.pq-event-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-sm);
    line-height: 1.25;
}
.pq-event-arabic-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}
.pq-event-arabic {
    font-family: var(--font-arabic, 'Traditional Arabic', serif);
    font-size: 1.6rem;
    color: var(--pq-gold);
    line-height: 1.5;
}
.pq-event-translit {
    font-size: 0.95rem;
    color: var(--pq-gray-500);
    font-style: italic;
}

/* Metadata strip */
.pq-event-meta-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-md);
    font-size: 0.8125rem;
    color: var(--pq-gray-600);
    margin-bottom: var(--space-md);
}
.pq-event-meta-item {
    position: relative;
}
.pq-event-meta-item + .pq-event-meta-item::before {
    content: '\00B7';
    position: absolute;
    left: calc(-0.5 * var(--space-md) - 2px);
    color: var(--pq-gray-400);
}

/* Badges */
.pq-event-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
}
.pq-event-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: var(--radius-full, 9999px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.pq-event-badge--holiday {
    background: var(--pq-green-dark);
    color: var(--pq-white, #fff);
}
.pq-event-badge--observance {
    background: var(--pq-gold);
    color: #1a1a1a;
}
.pq-event-badge--pillar {
    background: var(--pq-navy, #283593);
    color: var(--pq-white, #fff);
}
.pq-event-badge--sacred {
    background: var(--pq-cream-warm);
    color: var(--pq-green-dark);
    border: 1px solid var(--pq-gold-light, #F0E6C0);
}
.pq-event-badge--warning {
    background: #d32f2f;
    color: var(--pq-white, #fff);
}
/* v2.66.22 -- additional event-badge variants used on single-islamic_event */
.pq-event-badge--success {
    background: #2E7D32;
    color: #FFFFFF;
}
.pq-event-badge--strong {
    background: #1B5E20;
    color: #FFFFFF;
}
.pq-event-badge--info {
    background: var(--pq-light-gold, #FFF8E1);
    color: #8D6E00;
    border: 1px solid var(--pq-gold-light, #F0E6C0);
}

/* Divider */
.pq-event-divider {
    border: none;
    border-top: 1px solid var(--pq-divider, #e0e0e0);
    margin: 0 0 var(--space-lg);
}

/* Callout boxes (like women-in-islam contribution box) */
.pq-event-callout {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md, 8px);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    line-height: 1.65;
    border-left: 4px solid var(--pq-green);
    background: var(--pq-green-pale, #E8F5E9);
}
.pq-event-callout strong {
    margin-right: var(--space-xs);
}
.pq-event-callout--warning {
    border-left-color: #d32f2f;
    background: #ffebee;
}
.pq-event-callout--date {
    border-left-color: var(--pq-gold);
    background: var(--pq-light-gold, #FFF8E1);
}
/* v2.66.22 -- callout variants matching fasting-status badges */
.pq-event-callout--success {
    border-left-color: #2E7D32;
    background: #E8F5E9;
}
.pq-event-callout--strong {
    border-left-color: #1B5E20;
    background: #E8F5E9;
}
.pq-event-callout--info {
    border-left-color: #BF9000;
    background: #FFF8E1;
}
.pq-event-date-note {
    display: block;
    font-size: 0.78rem;
    color: var(--pq-gray-500);
    margin-top: var(--space-xs);
}

/* Main content */
.pq-event-content {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--pq-gray-800, #424242);
    margin-bottom: var(--space-2xl);
}
.pq-event-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: var(--space-xl) 0 var(--space-sm);
}
.pq-event-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    margin: var(--space-lg) 0 var(--space-xs);
}
.pq-event-content p {
    margin: 0 0 var(--space-md);
}
.pq-event-content blockquote {
    border-left: 3px solid var(--pq-gold);
    padding-left: var(--space-md);
    color: var(--pq-gray-600);
    font-style: italic;
    margin: var(--space-md) 0;
}

/* Calendar action box */
.pq-event-calendar-box {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--pq-cream, #FAF7F0);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-lg, 12px);
    margin-bottom: var(--space-2xl);
}
.pq-event-cal-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
}
.pq-event-cal-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.pq-event-cal-buttons .pq-btn {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--pq-green-dark);
    color: var(--pq-white, #fff);
}
.pq-event-cal-buttons .pq-btn:hover {
    background: var(--pq-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.pq-event-cal-buttons .pq-btn-outline {
    background: transparent;
    color: var(--pq-green-dark);
    border: 1.5px solid var(--pq-green-dark);
}
.pq-event-cal-buttons .pq-btn-outline:hover {
    background: var(--pq-green-dark);
    color: var(--pq-white, #fff);
}
.pq-event-cal-note {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    margin: 0;
}

/* Related events grid */
.pq-event-related {
    margin-bottom: var(--space-2xl);
}
.pq-event-related-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pq-green-dark);
    margin: 0 0 var(--space-md);
}
.pq-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}
.pq-related-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.pq-related-card:hover {
    border-color: var(--pq-green);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.pq-related-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pq-green-dark);
    line-height: 1.35;
}
.pq-related-arabic {
    font-family: var(--font-arabic, 'Traditional Arabic', serif);
    font-size: 1rem;
    color: var(--pq-gold);
}
.pq-related-date {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
}

/* Footer nav */
.pq-event-footer-nav {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--pq-divider, #e0e0e0);
}
.pq-back-link {
    color: var(--pq-green-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}
.pq-back-link:hover {
    color: var(--pq-green);
    text-decoration: underline;
}

/* Responsive: event single page */
@media (max-width: 600px) {
    .pq-event-single {
        padding: var(--space-md) var(--space-sm) var(--space-2xl);
    }
    .pq-event-title {
        font-size: 1.55rem;
    }
    .pq-event-arabic {
        font-size: 1.3rem;
    }
    .pq-event-meta-strip {
        flex-direction: column;
        align-items: center;
    }
    .pq-event-meta-item + .pq-event-meta-item::before {
        display: none;
    }
    .pq-related-grid {
        grid-template-columns: 1fr;
    }
    .pq-event-calendar-box {
        padding: var(--space-lg) var(--space-md);
    }
    .pq-event-cal-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ── Narrator Table Overrides ─────────────────────────────── */
.narrator-table .narrator-table-name {
    font-weight: 600;
    color: var(--pq-green-dark);
}
.narrator-table .narrator-table-name:hover {
    color: var(--pq-gold);
}
.narrator-table .narrator-table-dates {
    font-size: 0.8125rem;
    color: var(--pq-gray-600);
    white-space: nowrap;
}
.narrator-controls {
    margin-bottom: var(--space-lg);
}
.narrator-controls .narrator-alpha-nav {
    margin-top: var(--space-sm);
}
@media (max-width: 768px) {
    .narrator-table .col-arabic,
    .narrator-table .col-dates {
        display: none;
    }
}

/* ==========================================================================
   Chain Analysis Statistics Dashboard
   ========================================================================== */

.chain-stats-dashboard {
    margin-bottom: var(--space-xl, 2rem);
}

/* ── Stat Cards Grid ────────────────────────────────────────── */
.chain-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: var(--space-md, 1rem);
    margin-bottom: var(--space-xl, 2rem);
}
.chain-stat-card {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.chain-stat-card:hover {
    border-color: var(--pq-green, #2E7D32);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.chain-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pq-green-dark, #1B5E20);
    line-height: 1.2;
}
.chain-stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
    margin-top: 0.25rem;
    letter-spacing: 0.01em;
}

/* ── Chart Rows ─────────────────────────────────────────────── */
.chain-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-lg, 1.5rem);
}
.chain-charts-row--full {
    grid-template-columns: 1fr;
}
.chain-chart-panel {
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    overflow: hidden;
}
.chain-chart-panel--wide {
    max-width: 100%;
}
.chain-chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0 0 0.25rem 0;
}
.chain-chart-subtitle {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
    margin: 0 0 0.75rem 0;
}
.chain-chart-svg {
    width: 100%;
}
.chain-chart-svg svg {
    display: block;
    width: 100%;
    height: auto;
}
.chain-chart-empty {
    text-align: center;
    color: var(--pq-gray-500, #9E9E9E);
    font-size: 0.875rem;
    padding: 2rem 0;
}

/* ── Donut Chart ────────────────────────────────────────────── */
.chain-donut-total {
    font-size: 1.5rem;
    font-weight: 700;
    fill: var(--pq-green-dark, #1B5E20);
}
.chain-donut-label {
    font-size: 0.75rem;
    fill: var(--pq-gray-600, #757575);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Grade Legend ───────────────────────────────────────────── */
.chain-grade-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pq-gray-100, #F5F5F5);
}
.chain-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--pq-gray-600, #757575);
}
.chain-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.chain-legend-text {
    white-space: nowrap;
}

/* ── Bar Chart Labels ──────────────────────────────────────── */
.chain-bar-label {
    font-size: 0.75rem;
    fill: var(--pq-gray-700, #616161);
}
.chain-bar-count {
    font-size: 0.7rem;
    font-weight: 600;
    fill: var(--pq-gray-600, #757575);
}

/* ── Axes ──────────────────────────────────────────────────── */
.chain-axis path,
.chain-axis line {
    stroke: var(--pq-gray-300, #E0E0E0);
}
.chain-axis text {
    font-size: 0.7rem;
    fill: var(--pq-gray-600, #757575);
}
.chain-axis-label {
    font-size: 0.7rem;
    fill: var(--pq-gray-500, #9E9E9E);
    font-weight: 500;
}

/* ── Tooltip ───────────────────────────────────────────────── */
.chain-chart-tooltip {
    background: rgba(30, 30, 30, 0.92);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.45;
    max-width: 220px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.chain-chart-tooltip strong {
    color: #fff;
}

/* ── Divider ───────────────────────────────────────────────── */
.chain-divider {
    border: none;
    border-top: 2px solid var(--pq-gray-200, #E0E0E0);
    margin: var(--space-xl, 2rem) 0;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .chain-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .chain-charts-row {
        grid-template-columns: 1fr;
    }
    .chain-stat-number {
        font-size: 1.4rem;
    }
}
@media (max-width: 480px) {
    .chain-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .chain-stat-card {
        padding: 0.75rem 0.5rem;
    }
    .chain-stat-number {
        font-size: 1.2rem;
    }
}

/* ── Clickable Legend Items ──────────────────────────────────── */
.chain-legend-item--link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.chain-legend-item--link:hover {
    opacity: 0.75;
}
.chain-legend-item--link:hover .chain-legend-text {
    text-decoration: underline;
}

/* ── Clickable Bar Labels (SVG text inside <a>) ─────────────── */
.chain-bar-label--link {
    fill: var(--pq-green-dark, #1B5E20);
    cursor: pointer;
}
.chain-bar-label--link:hover {
    text-decoration: underline;
    fill: var(--pq-gold, #C49A2F);
}
.chain-bar-count--link {
    cursor: pointer;
}
.chain-bar-count--link:hover {
    fill: var(--pq-green-dark, #1B5E20);
}

/* ── Narrator Sort Controls ─────────────────────────────────── */
.chain-narrator-sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.chain-sort-label {
    font-size: 0.75rem;
    color: var(--pq-gray-600, #757575);
    white-space: nowrap;
}
.chain-sort-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--pq-gray-300, #E0E0E0);
    border-radius: 4px;
    background: var(--pq-white, #fff);
    color: var(--pq-gray-600, #757575);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.chain-sort-btn:hover {
    border-color: var(--pq-green, #2E7D32);
    color: var(--pq-green, #2E7D32);
}
.chain-sort-btn.active {
    background: var(--pq-green-dark, #1B5E20);
    color: #fff;
    border-color: var(--pq-green-dark, #1B5E20);
}
.chain-sort-count {
    font-size: 0.7rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-left: auto;
}

/* ── Scrollable Narrator List ───────────────────────────────── */
.chain-narrator-scroll {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: var(--radius-md, 8px);
    scrollbar-width: thin;
    scrollbar-color: var(--pq-gray-400, #BDBDBD) transparent;
}
.chain-narrator-scroll::-webkit-scrollbar {
    width: 6px;
}
.chain-narrator-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.chain-narrator-scroll::-webkit-scrollbar-thumb {
    background: var(--pq-gray-400, #BDBDBD);
    border-radius: 3px;
}
.chain-narrator-scroll svg {
    display: block;
}

/* ── Chain Length Results Panel ──────────────────────────────── */
.chain-length-results-panel {
    background: var(--pq-white, #fff);
    border: 2px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-md, 8px);
    margin-top: var(--space-lg, 1.5rem);
    overflow: hidden;
}
.chain-length-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--pq-green-pale, #E8F5E9);
    border-bottom: 1px solid var(--pq-gray-200, #E0E0E0);
}
.chain-length-results-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pq-green-dark, #1B5E20);
    margin: 0;
}
.chain-length-results-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--pq-gray-500, #9E9E9E);
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}
.chain-length-results-close:hover {
    color: var(--pq-green-dark, #1B5E20);
}
.chain-length-results-body {
    padding: 0.75rem 1rem;
    max-height: 400px;
    overflow-y: auto;
}
.chain-length-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.chain-length-result-item {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.chain-length-result-item:hover {
    background: var(--pq-green-pale, #E8F5E9);
}
.chain-result-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--pq-green-dark, #1B5E20);
}
.chain-result-collection {
    font-size: 0.75rem;
    color: var(--pq-gray-600, #757575);
    margin-top: 0.125rem;
}
.chain-result-narrators {
    font-size: 0.75rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-top: 0.125rem;
    font-style: italic;
}
.chain-loading-inline {
    text-align: center;
    padding: 2rem 0;
    color: var(--pq-gray-500, #9E9E9E);
    font-size: 0.875rem;
}
.chain-loading-inline .chain-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--pq-gray-300, #E0E0E0);
    border-top-color: var(--pq-green, #2E7D32);
    border-radius: 50%;
    animation: pq-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}
@keyframes pq-spin {
    to { transform: rotate(360deg); }
}

/* ── Chain Length Pagination ─────────────────────────────────── */
.chain-length-results-pagination {
    padding: 0 1rem 0.75rem;
}
.chain-length-pag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pq-gray-100, #F5F5F5);
}
.chain-pag-btn {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--pq-green, #2E7D32);
    border-radius: 4px;
    background: var(--pq-white, #fff);
    color: var(--pq-green-dark, #1B5E20);
    cursor: pointer;
    transition: all 0.15s;
}
.chain-pag-btn:hover {
    background: var(--pq-green, #2E7D32);
    color: #fff;
}
.chain-pag-info {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #757575);
}

/* ── Hadith Export Bar (shared across collection + chain pages) ────── */
.hadith-export-bar {
    margin: var(--space-md, 1rem) 0 var(--space-lg, 1.5rem);
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: linear-gradient(135deg, #f8faf8 0%, #faf9f5 100%);
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: var(--radius-lg, 10px);
}
.export-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm, 0.5rem);
}
.export-bar-left {
    font-size: 0.875rem;
    color: var(--pq-gray-700, #616161);
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.export-bar-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--pq-green-dark, #1a5632);
    background: #fff;
    border: 1px solid var(--pq-gray-200, #E0E0E0);
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.export-btn:hover {
    background: var(--pq-green, #2d8a4e);
    color: #fff;
    border-color: var(--pq-green, #2d8a4e);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 138, 78, 0.2);
}
.export-btn:active {
    transform: translateY(0);
}
.export-btn svg {
    flex-shrink: 0;
}
.export-btn-rss {
    border-color: #e67e22;
    color: #e67e22;
}
.export-btn-rss:hover {
    background: #e67e22;
    color: #fff;
    border-color: #e67e22;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.2);
}
.export-bar-hint {
    margin-top: var(--space-sm, 0.5rem);
    font-size: 0.75rem;
    color: var(--pq-gray-500, #9E9E9E);
    display: flex;
    align-items: center;
    gap: 4px;
}
/* Chain-length export bar spacing */
.chain-length-export-bar {
    padding: 0 1rem;
}
.chain-length-export-bar .hadith-export-bar {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
@media (max-width: 640px) {
    .export-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .export-bar-formats {
        width: 100%;
    }
}

/* ── Grade Filter Banner (narrator profiles page) ───────────── */
.narrator-grade-filter-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--pq-green-pale, #E8F5E9);
    border: 1px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-md, 8px);
    margin-bottom: var(--space-md, 1rem);
}
.narrator-grade-filter-banner .narrator-results-count {
    margin: 0;
    font-weight: 600;
    color: var(--pq-green-dark, #1B5E20);
}
.narrator-grade-filter-banner .narrator-search-clear {
    font-size: 0.8125rem;
    color: var(--pq-green, #2E7D32);
    text-decoration: underline;
    white-space: nowrap;
}

/* =============================================
   Isnad Tree Visualization (page-isnad-tree.php)
   ============================================= */

/* ── Search bar ──────────────────────────────────────────── */
.isnad-search-bar {
    position: relative;
}
.isnad-search-input {
    width: 100%;
    padding: 14px 20px 14px 44px;
    font-size: 1rem;
    border: 2px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-lg, 12px);
    background: var(--pq-white, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239E9E9E'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 14px center;
    background-size: 20px 20px;
    color: var(--pq-charcoal, #2D2D2D);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.isnad-search-input:focus {
    outline: none;
    border-color: var(--pq-green, #2E7D32);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

/* ── Search results dropdown ─────────────────────────────── */
.isnad-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 4px;
}
.isnad-sr-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    border-bottom: 1px solid var(--pq-divider, #D4D1CA);
    transition: background 0.15s;
}
.isnad-sr-item:last-child {
    border-bottom: none;
}
.isnad-sr-item:hover {
    background: var(--pq-bg-warm, #FAF8F1);
}
.isnad-sr-empty {
    padding: 16px;
    text-align: center;
    color: var(--pq-gray-500, #9E9E9E);
    font-size: 0.875rem;
}

/* ── Controls bar ────────────────────────────────────────── */
.isnad-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md, 1rem);
    padding: 12px 16px;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
    margin-bottom: var(--space-md, 1rem);
    flex-wrap: wrap;
}
.isnad-controls-left {
    flex: 1;
    min-width: 0;
}
.isnad-controls-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    flex-wrap: wrap;
}
.isnad-tree-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pq-charcoal, #2D2D2D);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.isnad-control-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.isnad-control-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-gray-500, #9E9E9E);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}
.isnad-dir-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-sm, 6px);
    background: var(--pq-white, #fff);
    color: var(--pq-gray-600, #757575);
    cursor: pointer;
    transition: all 0.15s;
}
.isnad-dir-btn:hover {
    border-color: var(--pq-green, #2E7D32);
    color: var(--pq-green, #2E7D32);
}
.isnad-dir-btn.active {
    background: var(--pq-green, #2E7D32);
    border-color: var(--pq-green, #2E7D32);
    color: #fff;
}
.isnad-depth-select {
    padding: 4px 8px;
    font-size: 0.8125rem;
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-sm, 6px);
    background: var(--pq-white, #fff);
    color: var(--pq-charcoal, #2D2D2D);
    cursor: pointer;
}
.isnad-ctrl-btn {
    padding: 4px 10px;
    font-size: 1rem;
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-sm, 6px);
    background: var(--pq-white, #fff);
    color: var(--pq-gray-600, #757575);
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.isnad-ctrl-btn:hover {
    border-color: var(--pq-green, #2E7D32);
    color: var(--pq-green, #2E7D32);
}

/* ── Featured narrators grid ─────────────────────────────── */
.isnad-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm, 0.5rem);
}
.isnad-featured-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: left;
    width: 100%;
}
.isnad-featured-card:hover {
    border-color: var(--pq-green, #2E7D32);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}
.isnad-card-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--pq-charcoal, #2D2D2D);
    margin-bottom: 2px;
}
.isnad-card-arabic {
    font-family: var(--ff-arabic, serif);
    font-size: 0.8125rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin-bottom: 6px;
}
.isnad-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.isnad-card-count {
    font-size: 0.75rem;
    color: var(--pq-gray-400, #BDBDBD);
}
.isnad-card-tabaqah {
    font-size: 0.6875rem;
    color: var(--pq-gray-400, #BDBDBD);
    background: var(--pq-bg-warm, #FAF8F1);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── Tree canvas ─────────────────────────────────────────── */
.isnad-tree-canvas {
    width: 100%;
    height: 600px;
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
    background: var(--pq-bg-warm, #FAF8F1);
    position: relative;
    overflow: hidden;
}
.isnad-tree-canvas svg {
    width: 100%;
    height: 100%;
    display: block;
}
.isnad-tree-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9375rem;
    color: var(--pq-gray-500, #9E9E9E);
    background: rgba(250, 248, 241, 0.85);
    z-index: 10;
}

/* ── Legend ───────────────────────────────────────────────── */
.isnad-tree-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    margin-top: var(--space-sm, 0.5rem);
    font-size: 0.75rem;
    color: var(--pq-gray-600, #757575);
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
}
.isnad-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.isnad-legend-hint {
    margin-left: auto;
    font-size: 0.6875rem;
    color: var(--pq-gray-400, #BDBDBD);
    font-style: italic;
}

/* ── Tooltip ─────────────────────────────────────────────── */
.isnad-tooltip {
    position: fixed;
    z-index: 10000;
    background: var(--pq-charcoal, #2D2D2D);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-md, 8px);
    font-size: 0.8125rem;
    line-height: 1.5;
    max-width: 280px;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ── Profile panel ───────────────────────────────────────── */
.isnad-profile-panel {
    margin-top: var(--space-md, 1rem);
    padding: 20px;
    background: var(--pq-white, #fff);
    border: 1px solid var(--pq-divider, #D4D1CA);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.isnad-profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-sm, 0.5rem);
}
.isnad-profile-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pq-charcoal, #2D2D2D);
    margin: 0;
}
.isnad-profile-arabic {
    font-family: var(--ff-arabic, serif);
    font-size: 0.9375rem;
    color: var(--pq-gray-500, #9E9E9E);
    margin: 2px 0 0 0;
}
.isnad-profile-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--pq-gray-400, #BDBDBD);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.isnad-profile-close:hover {
    color: var(--pq-charcoal, #2D2D2D);
}
.isnad-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-sm, 0.5rem);
}
.isnad-profile-stats > div {
    background: var(--pq-bg-warm, #FAF8F1);
    border-radius: var(--radius-sm, 6px);
    padding: 8px 10px;
}
.isnad-stat-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pq-gray-400, #BDBDBD);
    margin-bottom: 2px;
}
.isnad-profile-stats p {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-charcoal, #2D2D2D);
}
.isnad-profile-bio {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--pq-gray-600, #757575);
    margin: 0 0 var(--space-sm, 0.5rem) 0;
}
.isnad-profile-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    flex-wrap: wrap;
}
.isnad-profile-actions a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pq-green, #2E7D32);
}
.isnad-recenter-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid var(--pq-green, #2E7D32);
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--pq-green, #2E7D32);
    cursor: pointer;
    transition: all 0.15s;
}
.isnad-recenter-btn:hover {
    background: var(--pq-green, #2E7D32);
    color: #fff;
}

/* ── Fullscreen mode ─────────────────────────────────────── */
.isnad-fullscreen {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--pq-bg-warm, #FAF8F1);
    display: flex !important;
    flex-direction: column;
    margin: 0 !important;
    padding: var(--space-md, 1rem);
    border-radius: 0;
}
.isnad-fullscreen .isnad-tree-canvas {
    flex: 1;
    height: auto;
    border-radius: var(--radius-md, 8px);
}
.isnad-controls-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

/* ── D3 node styles ──────────────────────────────────────── */
.isnad-node circle {
    transition: stroke-width 0.15s;
}
.isnad-node:hover circle {
    stroke-width: 3;
    stroke: var(--pq-charcoal, #2D2D2D);
}
.isnad-section-label {
    font-family: system-ui, -apple-system, sans-serif;
    user-select: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .isnad-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .isnad-controls-right {
        width: 100%;
        justify-content: flex-start;
    }
    .isnad-tree-canvas {
        height: 450px;
    }
    .isnad-featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .isnad-profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .isnad-tree-legend {
        flex-wrap: wrap;
    }
    .isnad-legend-hint {
        margin-left: 0;
        width: 100%;
    }
}

/* ── Isnad Tree: Grid View ─────────────────────────────────── */

.isnad-grid-view {
    padding: var(--space-md) 0;
}

.isnad-grid-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pq-gray-800);
    margin: var(--space-lg) 0 var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--pq-green);
}

.isnad-grid-section-title:first-child {
    margin-top: 0;
}

.isnad-grid-count {
    font-weight: 400;
    color: var(--pq-gray-500);
    font-size: 0.875rem;
}

.isnad-grid-table {
    display: grid;
    gap: 0;
    margin-bottom: var(--space-md);
    border: 1px solid var(--pq-gray-200, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.8125rem;
}

.isnad-grid-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 0.8fr 0.7fr 0.5fr;
    gap: 0;
    align-items: center;
    border-bottom: 1px solid var(--pq-gray-200, #e5e7eb);
}

.isnad-grid-row:last-child {
    border-bottom: none;
}

.isnad-grid-header {
    background: var(--pq-gray-100, #f3f4f6);
    font-weight: 700;
    color: var(--pq-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.6875rem;
}

.isnad-grid-row:not(.isnad-grid-header):hover {
    background: rgba(46, 125, 50, 0.04);
}

.isnad-grid-cell {
    padding: 0.5rem 0.625rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.isnad-gc-arabic {
    font-size: 0.875rem;
}

.isnad-grid-recenter {
    background: none;
    border: 1px solid var(--pq-gray-300, #d1d5db);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: background 0.15s, border-color 0.15s;
}

.isnad-grid-recenter:hover {
    background: var(--pq-green);
    color: #fff;
    border-color: var(--pq-green);
}

/* View toggle buttons */
.isnad-view-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--pq-gray-300, #d1d5db);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.15s;
}

.isnad-view-btn.active {
    background: var(--pq-green);
    color: #fff;
    border-color: var(--pq-green);
}

.isnad-view-btn:hover:not(.active) {
    border-color: var(--pq-green);
    color: var(--pq-green);
}

/* Active sidebar tool */
.sidebar-tool-item.sidebar-tool-active {
    background: rgba(46, 125, 50, 0.06);
    border-left: 3px solid var(--pq-green);
    padding-left: calc(var(--space-sm) - 3px);
}

/* ── Isnad Grid responsive ─────────────────────────────────── */

@media (max-width: 768px) {
    .isnad-grid-row {
        grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr 0.5fr;
    }
    .isnad-gc-actions {
        display: none;
    }
}

@media (max-width: 480px) {
    .isnad-grid-row {
        grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr;
    }
    .isnad-gc-city,
    .isnad-gc-actions {
        display: none;
    }
}

/* Profile panel clickable links */
#ip-city-link,
#ip-count-link {
    transition: opacity 0.15s;
}

#ip-city-link:hover,
#ip-count-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Sortable grid headers */
.isnad-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.isnad-sortable:hover {
    color: var(--pq-green);
}

.isnad-grid-table-wrap {
    margin-bottom: var(--space-md);
}

/* ========================================================================== */
/* v2.65.5.15d -- Calendar refresh: A2 merged banner, sidebar cards,           */
/* month icons, pillar icons, view-as essay page                               */
/* ========================================================================== */

/* ---- Extended pill variants (filled + icon slot) ------------------------- */
.pq-ical-pill {
	gap: 6px;
}
.pq-ical-pill-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05em;
	line-height: 1;
}
.pq-ical-pill--filled {
	background: var(--pq-green, #2E7D32);
	color: #fff;
	border: 1px solid var(--pq-green, #2E7D32);
}
.pq-ical-pill--filled:hover,
.pq-ical-pill--filled:focus {
	background: #1B5E20;
	border-color: #1B5E20;
	color: #fff;
}

/* ---- A2 Merged Banner (Showing crown + Today card + Year nav) ------------ */
.pq-ical-banner--a2 {
	margin: 1.25rem 0 1.5rem;
	border: 1px solid var(--pq-green-pale, #cfe3d3);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	position: relative;
	padding: 0 1.25rem 1.1rem;
}
.pq-ical-banner-crown {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--pq-green, #2E7D32);
	color: #fff;
	padding: 6px 18px;
	border-radius: 999px;
	font-size: 0.92rem;
	font-weight: 600;
	position: relative;
	top: -14px;
	box-shadow: 0 2px 6px rgba(46, 125, 50, 0.18);
}
.pq-ical-banner-crown-label {
	opacity: 0.92;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.78rem;
}
.pq-ical-banner-crown-year {
	font-weight: 700;
}
.pq-ical-banner-today {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	padding: 0.25rem 0 0.75rem;
	text-decoration: none;
	color: inherit;
}
.pq-ical-banner-today:hover,
.pq-ical-banner-today:focus {
	color: var(--pq-green, #2E7D32);
}
.pq-ical-banner-today-pill {
	display: inline-flex;
	align-items: center;
	background: #fffbe6;
	color: var(--pq-green, #2E7D32);
	border: 1px solid var(--pq-green, #2E7D32);
	padding: 4px 14px;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.pq-ical-banner-greg,
.pq-ical-banner-hijri {
	font-weight: 600;
	font-size: 1rem;
}
.pq-ical-banner-ar {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--pq-green, #2E7D32);
}
.pq-ical-banner-sep {
	color: #999;
	font-weight: 700;
}
.pq-ical-banner-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	padding-top: 0.85rem;
	border-top: 1px dashed var(--pq-green-pale, #cfe3d3);
	font-size: 0.92rem;
}
.pq-ical-banner-nav-link {
	color: var(--pq-green, #2E7D32);
	text-decoration: none;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
	transition: background 0.15s;
}
.pq-ical-banner-nav-link:hover,
.pq-ical-banner-nav-link:focus {
	background: var(--pq-green-pale, #eaf4ec);
}
.pq-ical-banner-nav-divider {
	color: #bbb;
	font-weight: 700;
	letter-spacing: 0.2em;
}
.pq-ical-banner-today-pill--nav {
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
a.pq-ical-banner-today-pill--nav:hover,
a.pq-ical-banner-today-pill--nav:focus {
	background: var(--pq-green, #2E7D32);
	color: #fffbe6;
}
.pq-ical-banner-today-pill--inactive {
	opacity: 0.6;
	cursor: default;
}

/* ---- Month icon wrap (in month header) ----------------------------------- */
.pq-month-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	margin-right: 10px;
	flex-shrink: 0;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.pq-month-icon-wrap.b-sacred   { background: #fff7d6; }
.pq-month-icon-wrap.b-ramadan  { background: #e8f5ea; }
.pq-month-icon-wrap.b-hajj     { background: #fdf3e3; }
.pq-month-icon-wrap.b-ordinary { background: #fbfbf8; }
.pq-month-icon-wrap svg {
	width: 44px;
	height: 44px;
}

/* ---- Calendar two-column layout (grid + sidebar) ------------------------- */
.pq-ical-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin-top: 1rem;
}
@media (min-width: 1024px) {
	.pq-ical-layout {
		grid-template-columns: minmax(0, 1fr) 320px;
		align-items: start;
	}
}
.pq-ical-main-col { min-width: 0; }
.pq-ical-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
@media (min-width: 1024px) {
	.pq-ical-sidebar { position: sticky; top: 1rem; }
}

/* ---- Sidebar cards ------------------------------------------------------- */
.pq-ical-side-card {
	background: #fff;
	border: 1px solid var(--pq-green-pale, #cfe3d3);
	border-radius: 12px;
	padding: 1rem 1.1rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pq-ical-side-heading {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	font-size: 1rem;
	color: var(--pq-green-dark, #1B5E20);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.pq-ical-side-icon { font-size: 1.15em; }
.pq-ical-side-today-line { margin: 0.25rem 0; font-size: 1rem; }
.pq-ical-side-today-ar {
	margin: 0.15rem 0;
	font-size: 1.2rem;
	color: var(--pq-green, #2E7D32);
}
.pq-ical-side-today-greg { margin: 0.15rem 0; color: #666; font-size: 0.92rem; }

/* v2.66.47: Emphasize the "Today in Islam" card so it stands out on the
   busy calendar page - thicker green border, and the Gregorian date is
   rendered bold in PQ green for quick scanning. */
.pq-ical-side-card--today {
	border-width: 2px;
	border-color: var(--pq-green, #2E7D32);
}
.pq-ical-side-card--today .pq-ical-side-today-greg {
	color: var(--pq-green-dark, #1B5E20);
	font-weight: 700;
}

.pq-ical-side-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}
.pq-ical-side-actions .pq-ical-pill {
	width: 100%;
	justify-content: flex-start;
}

.pq-ical-side-month-strip {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 4px;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px dashed var(--pq-green-pale, #cfe3d3);
}
.pq-ical-side-month-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4px 2px;
	border-radius: 8px;
	text-decoration: none;
	color: var(--pq-green-dark, #1B5E20);
	font-size: 0.7rem;
	font-weight: 600;
	transition: transform 0.12s;
}
.pq-ical-side-month-chip:hover,
.pq-ical-side-month-chip:focus {
	transform: translateY(-1px);
}
.pq-ical-side-month-chip.b-sacred   { background: #fff7d6; }
.pq-ical-side-month-chip.b-ramadan  { background: #e8f5ea; }
.pq-ical-side-month-chip.b-hajj     { background: #fdf3e3; }
.pq-ical-side-month-chip.b-ordinary { background: #fbfbf8; }
.pq-ical-side-month-chip svg { width: 22px; height: 22px; }
.pq-ical-side-month-num { font-size: 0.65rem; opacity: 0.7; }

.pq-ical-side-viewas {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.pq-ical-side-viewas-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #fbfbf8;
	border: 1px solid var(--pq-green-pale, #cfe3d3);
	color: var(--pq-green-dark, #1B5E20);
	text-decoration: none;
	font-size: 0.82rem;
	font-weight: 600;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pq-ical-side-viewas-pill:hover,
.pq-ical-side-viewas-pill:focus {
	background: var(--pq-green-pale, #eaf4ec);
}
.pq-ical-side-viewas-pill.is-active {
	background: var(--pq-green, #2E7D32);
	color: #fff;
	border-color: var(--pq-green, #2E7D32);
}
.pq-ical-side-viewas-icon { font-size: 1em; }

.pq-ical-side-essay-blurb {
	margin: 0 0 0.75rem;
	font-size: 0.92rem;
	color: #444;
	line-height: 1.5;
}

.pq-ical-side-links {
	list-style: none;
	margin: 0;
	padding: 0;
}
.pq-ical-side-links li {
	border-bottom: 1px solid var(--pq-green-pale, #eaf4ec);
}
.pq-ical-side-links li:last-child { border-bottom: 0; }
.pq-ical-side-links a {
	display: block;
	padding: 7px 0;
	color: var(--pq-green-dark, #1B5E20);
	text-decoration: none;
	font-size: 0.92rem;
	transition: color 0.15s, padding-left 0.15s;
}
.pq-ical-side-links a:hover,
.pq-ical-side-links a:focus {
	color: var(--pq-green, #2E7D32);
	padding-left: 4px;
}

/* v2.66.48: About the Islamic Calendar - sidebar quick-link list (boxed items) */
.pq-ical-side-essay-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.pq-ical-side-essay-links li {
	margin: 0;
}
.pq-ical-side-essay-link {
	display: block;
	padding: 10px 12px;
	background: #fafaf6;
	border: 1px solid var(--pq-green-pale, #eaf4ec);
	border-radius: 8px;
	color: var(--pq-green-dark, #1B5E20);
	text-decoration: none;
	font-size: 0.88rem;
	line-height: 1.3;
	position: relative;
	padding-left: 26px;
	transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.pq-ical-side-essay-link::before {
	content: "";
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--pq-green, #2E7D32);
	opacity: 0.7;
}
.pq-ical-side-essay-link:hover,
.pq-ical-side-essay-link:focus {
	background: #fff;
	border-color: var(--pq-green, #2E7D32);
	color: var(--pq-green, #2E7D32);
	transform: translateX(2px);
}
.pq-ical-side-essay-link.is-target {
	background: #fff7d6;
	border-color: var(--pq-gold, #C9A227);
}

/* ---- Pillar icon wrap (overview + detail) -------------------------------- */
.pq-pillar-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 14px;
	margin-bottom: 0.5rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.pq-pillar-icon-wrap.b-sacred   { background: #fff7d6; }
.pq-pillar-icon-wrap.b-ramadan  { background: #e8f5ea; }
.pq-pillar-icon-wrap.b-hajj     { background: #fdf3e3; }
.pq-pillar-icon-wrap.b-ordinary { background: #fbfbf8; }
.pq-pillar-icon-wrap svg { width: 56px; height: 56px; }
.pq-pillar-icon-wrap--lg {
	width: 104px;
	height: 104px;
	border-radius: 18px;
	margin-bottom: 0.85rem;
}
.pq-pillar-icon-wrap--lg svg { width: 80px; height: 80px; }

/* ---- About the Islamic Calendar essay page ------------------------------- */
.pq-essay-page {
	max-width: 760px;
	margin: 2rem auto;
	padding: 0 1.25rem;
	line-height: 1.7;
	color: #222;
}
.pq-essay-header { margin-bottom: 1.5rem; text-align: center; }
.pq-essay-header h1 {
	font-size: 2rem;
	color: var(--pq-green-dark, #1B5E20);
	margin-bottom: 0.4rem;
}
.pq-essay-subtitle {
	color: #555;
	font-size: 1rem;
	margin: 0;
}
.pq-essay-mode-banner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.1rem;
	border-radius: 12px;
	margin-bottom: 1.75rem;
	background: var(--pq-green-pale, #eaf4ec);
	border: 1px solid #cfe3d3;
	color: var(--pq-green-dark, #1B5E20);
	font-size: 0.95rem;
}
.pq-essay-mode-banner--kids {
	background: #fff5d8;
	border-color: #f0d68a;
	color: #5a4400;
}
.pq-essay-mode-icon {
	font-size: 1.4rem;
	flex-shrink: 0;
}
.pq-essay-mode-text { flex: 1; }
.pq-essay-mode-change {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}
.pq-essay-body {
	background: #fff;
	padding: 1.25rem 1.5rem;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.pq-essay-section { margin-bottom: 1.75rem; }
.pq-essay-section h2 {
	font-size: 1.35rem;
	color: var(--pq-green-dark, #1B5E20);
	margin: 0 0 0.5rem;
	padding-bottom: 0.3rem;
	border-bottom: 2px solid var(--pq-green-pale, #eaf4ec);
}
.pq-essay-section h3 {
	font-size: 1.05rem;
	color: var(--pq-green-dark, #1B5E20);
	margin: 0.85rem 0 0.35rem;
}
.pq-essay-section p { margin: 0.5rem 0; }
.pq-essay-section ul {
	margin: 0.5rem 0 0.5rem 1.5rem;
	padding: 0;
}
.pq-essay-section ul li { margin: 0.25rem 0; }
.pq-essay-refs { font-size: 0.92rem; color: #555; }
.pq-essay-refs h2 { color: #555; border-bottom-color: #ddd; }

.pq-essay-callout {
	margin: 1rem 0;
	padding: 0.85rem 1.1rem;
	border-radius: 10px;
	border-left: 4px solid var(--pq-green, #2E7D32);
	background: var(--pq-green-pale, #eaf4ec);
}
.pq-essay-callout--green {
	background: var(--pq-green-pale, #eaf4ec);
	border-left-color: var(--pq-green, #2E7D32);
}
.pq-essay-callout--gold {
	background: #fff5d8;
	border-left: 4px dashed #d4a93c;
	color: #5a4400;
}
.pq-essay-callout--gold h3 { color: #7a5a00; }
.pq-essay-callout h3 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.pq-essay-callout p { margin: 0; }

.pq-essay-changeview {
	margin: 2rem 0 1rem;
	padding: 1.1rem 1.25rem;
	border: 1px dashed var(--pq-green-pale, #cfe3d3);
	border-radius: 12px;
	background: #fbfbf8;
}
.pq-essay-changeview h3 {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	color: var(--pq-green-dark, #1B5E20);
}
.pq-essay-changeview-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.pq-essay-back {
	margin-top: 1.25rem;
	text-align: center;
}
.pq-essay-back a {
	color: var(--pq-green, #2E7D32);
	text-decoration: none;
	font-weight: 600;
}
.pq-essay-back a:hover,
.pq-essay-back a:focus { text-decoration: underline; }

/* Kids mode body tweaks: a touch friendlier */
.pq-essay-page.mode-kids .pq-essay-body { background: #fffdf6; }
.pq-essay-page.mode-kids .pq-essay-section h2 {
	border-bottom-color: #f0d68a;
	color: #7a5a00;
}

/* ---- Pillar card icon spacing fix --------------------------------------- */
.pillar-card .pq-pillar-icon-wrap {
	display: flex;
	margin: 0.5rem auto 0.75rem;
}
.pillar-detail-header .pq-pillar-icon-wrap {
	display: flex;
	margin: 0 auto 1rem;
}


/* =====================================================================
   v2.65.5.15g - Sticky-header-aware scroll anchors + essay export bar
   ===================================================================== */

/* Prevent sticky .site-header from hiding the top of each month section
   when the user clicks a month chip. The site-header has --header-height
   set on .header-inner; we offset by ~88px to clear the header plus a
   small visual buffer. Also applies to year dividers so jumps still feel
   natural when a wrap-around year boundary is in the way.                */
.pq-ical-month,
.pq-ical-year-divider {
	scroll-margin-top: 88px;
}

/* Smooth scrolling for in-page month-pill jumps. Falls back gracefully
   on browsers that do not support scroll-behavior.                       */
html {
	scroll-behavior: smooth;
}

/* Essay page two-column layout - mirrors .pq-ical-layout on calendar page
   but kept light because the essay column does the heavy lifting.        */
.pq-essay-page .pq-ical-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 2rem;
	align-items: start;
}

.pq-essay-page .pq-ical-main-col {
	min-width: 0;
}

.pq-essay-page .pq-ical-sidebar {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	padding-right: 4px;
}

/* Export bar at bottom of essay page                                     */
.pq-ical-export-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	padding: 1rem;
	margin: 2rem 0 1.5rem;
	background: var(--pq-cream, #fdfaf1);
	border: 1px solid var(--pq-green-pale, #e6ebe2);
	border-radius: 12px;
}

.pq-ical-export-label {
	font-family: var(--font-serif, Georgia, serif);
	font-weight: 600;
	color: var(--pq-green-dark, #2a4a36);
	margin-right: 0.5rem;
	font-size: 0.95rem;
}

.pq-ical-pill--export {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.75rem;
	background: #fff;
	border: 1px solid var(--pq-green-pale, #cfd8c8);
	border-radius: 999px;
	color: var(--pq-green-dark, #2a4a36);
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: all 150ms ease;
}

.pq-ical-pill--export:hover,
.pq-ical-pill--export:focus {
	background: var(--pq-green-dark, #2a4a36);
	color: #fff;
	border-color: var(--pq-green-dark, #2a4a36);
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pq-ical-pill--export .pq-ical-pill-icon {
	font-weight: 700;
	font-size: 0.85em;
	opacity: 0.85;
}

/* Responsive: collapse essay sidebar below the column at narrow widths  */
@media (max-width: 1024px) {
	.pq-essay-page .pq-ical-layout {
		grid-template-columns: 1fr;
	}
	.pq-essay-page .pq-ical-sidebar {
		position: static;
		max-height: none;
		overflow: visible;
		flex-direction: column;
	}
}

@media (max-width: 600px) {
	.pq-ical-export-bar {
		gap: 0.35rem;
		padding: 0.75rem;
	}
	.pq-ical-pill--export {
		padding: 0.3rem 0.6rem;
		font-size: 0.72rem;
	}
}

/* =====================================================================
   Chain Strength Heatmap (v2.65.5.15k)
   ===================================================================== */

.pq-csh-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}
.pq-csh-wrap { display: flex; flex-direction: column; gap: var(--space-lg); }

.pq-csh-hero {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    background: linear-gradient(135deg, var(--pq-green-dark, #1B5E20) 0%, var(--pq-green, #2E7D32) 100%);
    color: #fff;
    border-radius: 12px;
}
.pq-csh-title { margin: 0 0 0.4rem; font-size: 2rem; color: #fff; }
.pq-csh-subtitle { margin: 0 auto 1rem; max-width: 720px; font-size: 1rem; opacity: 0.92; }
.pq-csh-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.25rem; font-size: 0.9rem; }
.pq-csh-meta-item { background: rgba(255,255,255,0.12); padding: 0.35rem 0.9rem; border-radius: 999px; }
.pq-csh-meta-item strong { font-weight: 700; }

.pq-csh-legend {
    background: #fff;
    border: 1px solid var(--pq-divider, #E0E0E0);
    border-radius: 10px;
    padding: var(--space-md);
}
.pq-csh-legend-heading { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--pq-charcoal, #263238); }
.pq-csh-legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pq-csh-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.pq-csh-legend-swatch {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}
.pq-csh-legend-label { color: var(--pq-charcoal, #455A64); }
.pq-csh-legend-note { margin: 0.75rem 0 0; font-size: 0.82rem; color: var(--pq-muted, #607D8B); font-style: italic; }

.pq-csh-controls { display: flex; justify-content: flex-end; }
.pq-csh-filter-form { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pq-csh-filter-label { font-weight: 600; color: var(--pq-charcoal, #263238); }
.pq-csh-filter-select {
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--pq-divider, #CFD8DC);
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
}
.pq-csh-filter-btn {
    padding: 0.45rem 1.1rem;
    border: none;
    background: var(--pq-green, #2E7D32);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.pq-csh-filter-btn:hover { background: var(--pq-green-dark, #1B5E20); }

.pq-csh-grid-wrap { background: #fff; border: 1px solid var(--pq-divider, #E0E0E0); border-radius: 10px; overflow: hidden; }
.pq-csh-grid-scroll { overflow-x: auto; }
.pq-csh-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 720px;
}
.pq-csh-grid thead th {
    position: sticky;
    top: 0;
    background: #F5F7FA;
    padding: 0.7rem 0.6rem;
    text-align: center;
    border-bottom: 2px solid var(--pq-divider, #CFD8DC);
    font-weight: 700;
    color: var(--pq-charcoal, #263238);
    white-space: nowrap;
    z-index: 2;
}
.pq-csh-grid thead th.pq-csh-col-narrator { text-align: left; min-width: 240px; }
.pq-csh-grid thead th.pq-csh-col-collection { font-size: 0.78rem; }
.pq-csh-grid thead th.pq-csh-col-total { background: #ECEFF1; }

.pq-csh-cell-narrator {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid #ECEFF1;
    vertical-align: middle;
    background: #FAFBFC;
    position: sticky;
    left: 0;
    z-index: 1;
}
.pq-csh-narrator-link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-decoration: none;
    color: inherit;
}
.pq-csh-narrator-link:hover .pq-csh-narrator-name { color: var(--pq-green-dark, #1B5E20); text-decoration: underline; }
.pq-csh-narrator-name { font-weight: 600; color: var(--pq-charcoal, #263238); font-size: 0.9rem; }
.pq-csh-narrator-ar { font-family: 'Amiri', 'Traditional Arabic', serif; font-size: 0.95rem; color: var(--pq-green-dark, #1B5E20); }
.pq-csh-grade-chip {
    align-self: flex-start;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0.15rem;
}

.pq-csh-cell {
    text-align: center;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #ECEFF1;
    border-left: 1px solid #ECEFF1;
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: default;
}
.pq-csh-cell-filled:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    position: relative;
}
.pq-csh-cell-empty { background: #FAFBFC; color: #B0BEC5; }
.pq-csh-cell-count { font-variant-numeric: tabular-nums; }
.pq-csh-cell-dash { font-size: 0.9rem; }
.pq-csh-cell-total {
    text-align: center;
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid #ECEFF1;
    border-left: 2px solid #CFD8DC;
    background: #ECEFF1;
    font-weight: 700;
    color: var(--pq-charcoal, #263238);
    font-variant-numeric: tabular-nums;
}

.pq-csh-empty {
    background: #fff;
    border: 1px dashed var(--pq-divider, #CFD8DC);
    border-radius: 10px;
    padding: var(--space-lg);
    text-align: center;
    color: var(--pq-muted, #607D8B);
}

.pq-csh-about {
    background: #FAFBFC;
    border: 1px solid var(--pq-divider, #E0E0E0);
    border-radius: 10px;
    padding: var(--space-md);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--pq-charcoal, #455A64);
}
.pq-csh-about-heading { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--pq-charcoal, #263238); }
.pq-csh-about p { margin: 0 0 0.6rem; }
.pq-csh-about p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
    .pq-csh-title { font-size: 1.5rem; }
    .pq-csh-meta { gap: 0.6rem; font-size: 0.8rem; }
    .pq-csh-grid { font-size: 0.78rem; }
    .pq-csh-grid thead th { padding: 0.5rem 0.4rem; }
    .pq-csh-cell { padding: 0.45rem 0.3rem; }
    .pq-csh-narrator-name { font-size: 0.82rem; }
    .pq-csh-grade-chip { font-size: 0.62rem; }
}

/* === Heatmap v15l — sortable headers + clickable cells === */
.pq-csh-col-sortable { padding: 0 !important; }
.pq-csh-sort-link {
    display: block;
    padding: 0.7rem 0.6rem;
    color: var(--pq-charcoal, #263238);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.12s ease;
    white-space: nowrap;
}
.pq-csh-sort-link:hover {
    background: #E8F0E9;
    color: var(--pq-green-dark, #1B5E20);
}
.pq-csh-col-narrator.pq-csh-col-sortable .pq-csh-sort-link {
    text-align: left;
}
.pq-csh-col-collection.pq-csh-col-sortable .pq-csh-sort-link,
.pq-csh-col-total.pq-csh-col-sortable .pq-csh-sort-link {
    text-align: center;
}
.pq-csh-col-active .pq-csh-sort-link {
    background: #E8F5E9;
    color: var(--pq-green-dark, #1B5E20);
}
.pq-csh-sort-indicator {
    font-size: 0.75em;
    margin-left: 0.25rem;
    display: inline-block;
    vertical-align: middle;
}
.pq-csh-sort-indicator--inactive { opacity: 0.35; }
.pq-csh-sort-indicator--active { opacity: 1; color: var(--pq-green-dark, #1B5E20); }

.pq-csh-cell-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    padding: 0.4rem 0.2rem;
    margin: -0.6rem -0.4rem;
    box-sizing: border-box;
}
.pq-csh-cell-link:hover { text-decoration: none; color: inherit; }
.pq-csh-cell-link:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.pq-csh-cell-filled { padding: 0 !important; }
.pq-csh-cell-filled .pq-csh-cell-link { padding: 0.6rem 0.4rem; margin: 0; }
.pq-csh-cell-filled:hover .pq-csh-cell-link { text-decoration: none; }

/* ==================================================================
   v2.65.5.15n -- Hadith Grade Attribution
   ------------------------------------------------------------------
   - .pq-grade-chips: chip group container (used in lists + single)
   - .pq-grade-chip: individual chip with scholar attribution
   - .pq-grade-chip-info: small "i" affordance signaling tooltip
   - .pq-hadith-grade-disclosure: footer note on single-hadith
   - .pq-methodology-section: methodology page sections
   ================================================================== */

.pq-grade-chips {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.pq-grade-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 100px;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: help;
	line-height: 1.4;
}

.pq-grade-chip-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.12);
	color: inherit;
	font-size: 0.625rem;
	font-style: italic;
	font-weight: 700;
	font-family: Georgia, serif;
	opacity: 0.8;
}

.pq-grade-methodology-link {
	font-size: 0.75rem;
	color: var(--pq-gray-600, #4b5563);
	text-decoration: underline;
	text-underline-offset: 2px;
	margin-left: 6px;
}

.pq-grade-methodology-link:hover {
	color: var(--pq-green-dark, #1B5E20);
}

.pq-single-grade-chips {
	display: block;
}

/* On dark page-header (single-hadith.php), chip "i" badge needs a lighter bg */
.page-header .pq-grade-chip-info {
	background: rgba(255, 255, 255, 0.35);
}

/* Footer disclosure on single-hadith */
.pq-hadith-grade-disclosure {
	margin: var(--space-lg, 1.5rem) 0;
	padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
	background: var(--pq-cream, #fdf6e3);
	border-left: 3px solid var(--pq-gray-300, #d1d5db);
	border-radius: 4px;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--pq-gray-700, #374151);
}

.pq-hadith-grade-disclosure details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--pq-gray-900, #111827);
	list-style: none;
	display: flex;
	align-items: center;
	gap: 6px;
}

.pq-hadith-grade-disclosure details summary::before {
	content: "\25B8"; /* small right-pointing triangle */
	display: inline-block;
	transition: transform 0.15s ease;
	font-size: 0.75rem;
	color: var(--pq-gray-500, #6b7280);
}

.pq-hadith-grade-disclosure details[open] summary::before {
	transform: rotate(90deg);
}

.pq-hadith-grade-disclosure details summary::-webkit-details-marker {
	display: none;
}

.pq-hadith-grade-disclosure p {
	margin: var(--space-sm, 0.5rem) 0 0 0;
}

.pq-hadith-grade-disclosure a {
	color: var(--pq-green-dark, #1B5E20);
	font-weight: 600;
}

/* Methodology page */
.pq-methodology-section {
	margin-bottom: var(--space-xl, 2rem);
	padding-bottom: var(--space-lg, 1.5rem);
	border-bottom: 1px solid var(--pq-gray-200, #e5e7eb);
}

.pq-methodology-section:last-of-type {
	border-bottom: none;
}

.pq-methodology-section h2 {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--pq-green-dark, #1B5E20);
	margin: 0 0 var(--space-md, 1rem) 0;
}

.pq-methodology-section p {
	font-size: 1rem;
	line-height: 1.65;
	margin: 0 0 var(--space-md, 1rem) 0;
	color: var(--pq-gray-800, #1f2937);
}

.pq-methodology-section p:last-child {
	margin-bottom: 0;
}

.pq-methodology-section strong {
	color: var(--pq-gray-900, #111827);
}

.pq-methodology-section a {
	color: var(--pq-green-dark, #1B5E20);
	font-weight: 600;
}


/* ==================================================================
   v2.65.5.15o -- Hadith Grade Attribution refinements
   ------------------------------------------------------------------
   - Force pill rendering in the grading-comparison panel (override
     the legacy .grading-card rectangular layout when the new chip
     classes are present on the same wrapper).
   - Tighter wrap behavior for header chip groups so a row of 4
     chips on Sunan Abi Dawud-style hadith does not stack ugly.
   ================================================================== */

/* Override the legacy .grading-cards flex-card behavior whenever the new
   pill chip classes are also applied to the wrapper. */
.grading-cards.pq-grade-chips {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-top: 0;
}

/* Hard-reset any leftover .grading-card chrome inside the chip wrapper. */
.grading-cards.pq-grade-chips .grading-card {
	all: unset;
}

/* Header chip group: relax min-width so 3-4 chips fit on one row at
   common viewports; subtle column-gap when wrapped. */
.page-header .pq-grade-chips {
	row-gap: 6px;
}

/* Header chip readability against the dark teal header background:
   slightly stronger shadow line so chips read crisply. */
.page-header .pq-grade-chip {
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Comparison panel chip group: a bit more breathing room above the
   chips below the explanatory note. */
.grading-panel .pq-grade-chips {
	margin-top: 4px;
}


/* ==========================================================================
   v2.66.9z23d - Tafsir Source Page Layout
   Main+rail grid (mirrors landing) + ayah-style commentary cards.
   ========================================================================== */

/* Surface the .pq-tf-grid layout when used on tafsir source pages. */
.pq-tf-source-page {
	max-width: var(--container, 1280px);
	margin: 0 auto;
	padding: 0 var(--space-md);
}
.pq-tf-source-page .pq-tf-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--space-xl, 32px);
	align-items: start;
	margin: var(--space-lg) 0;
}
.pq-tf-source-page .pq-tf-main {
	min-width: 0;
}
.pq-tf-source-page .pq-tf-rail {
	position: sticky;
	top: 80px;
	align-self: start;
}

@media (max-width: 960px) {
	.pq-tf-source-page .pq-tf-grid {
		grid-template-columns: 1fr;
	}
	.pq-tf-source-page .pq-tf-rail {
		position: static;
	}
}

/* Compact surah grid (used on the narrower tafsir-source main column).
   Auto-fit so chips fill the available width without horizontal overflow. */
.tafsir-surah-grid.tafsir-surah-grid--compact {
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 4px;
}
.tafsir-surah-grid.tafsir-surah-grid--compact .tafsir-surah-chip {
	padding: 5px 7px;
	font-size: 0.72rem;
	gap: 4px;
}
.tafsir-surah-grid.tafsir-surah-grid--compact .tafsir-surah-num {
	min-width: 18px;
	font-size: 0.72rem;
}
.tafsir-surah-grid.tafsir-surah-grid--compact .tafsir-surah-name {
	font-size: 0.7rem;
}

/* Tafsir ayah list: cards inherit .ayah-card-restructured visuals. */
.tafsir-ayah-list {
	margin-top: var(--space-md);
}
.tafsir-ayah-card {
	margin-bottom: var(--space-md);
}

/* Inline commentary block inside the ayah card, below the translation. */
.tafsir-inline-commentary {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--pq-border, #e0d8cc);
}
.tafsir-inline-commentary .tafsir-commentary-label {
	display: inline-block;
	margin-bottom: 6px;
	color: var(--pq-green-dark, #1a5f4a);
	font-weight: 600;
}
.tafsir-commentary-body {
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--pq-text-primary, #2c2418);
}
.tafsir-commentary-body p {
	margin: 0 0 0.7em;
}
.tafsir-commentary-body p:last-child {
	margin-bottom: 0;
}
.tafsir-commentary-body + .tafsir-commentary-body {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dotted var(--pq-border, #e8e0d4);
}
.tafsir-commentary-range {
	display: inline-block;
	margin-bottom: 4px;
	padding: 2px 8px;
	font-size: 0.72rem;
	color: var(--pq-text-muted, #6b6358);
	background: var(--pq-surface-alt, #f9f7f3);
	border-radius: 10px;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   v2.66.9z23e - Tafsir Sura Page: Verse Display Toggle (EN / AR / EN+AR / None)
   Segmented control that controls visibility of Arabic + translation inside
   each ayah card. Commentary is always shown.
   ========================================================================== */

.pq-tf-textmode {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: var(--space-md) 0 var(--space-sm);
	padding: 10px 14px;
	background: var(--pq-surface-alt, #f9f7f3);
	border: 1px solid var(--pq-border, #e0d8cc);
	border-radius: 10px;
}
.pq-tf-textmode-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--pq-green-dark, #1a5f4a);
}
.pq-tf-textmode-seg {
	display: inline-flex;
	background: #fff;
	border: 1px solid var(--pq-border, #e0d8cc);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pq-tf-textmode-btn {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	border-right: 1px solid var(--pq-border, #e0d8cc);
	padding: 7px 14px;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--pq-text-primary, #2c2418);
	cursor: pointer;
	transition: background-color 0.12s ease, color 0.12s ease;
	line-height: 1.2;
}
.pq-tf-textmode-btn:last-child {
	border-right: 0;
}
.pq-tf-textmode-btn:hover:not(.is-active) {
	background: var(--pq-surface-alt, #f9f7f3);
}
.pq-tf-textmode-btn:focus-visible {
	outline: 2px solid var(--pq-green-dark, #1a5f4a);
	outline-offset: -2px;
}
.pq-tf-textmode-btn.is-active {
	background: var(--pq-green-dark, #1a5f4a);
	color: #fff;
}
.pq-tf-textmode-hint {
	font-size: 0.72rem;
	color: var(--pq-text-muted, #6b6358);
	margin-left: auto;
	font-style: italic;
}
@media (max-width: 520px) {
	.pq-tf-textmode-hint {
		margin-left: 0;
		flex-basis: 100%;
	}
}

/* Visibility rules for each mode. Targets the .pq-tf-ar (Arabic) and
   .pq-tf-en (translator label + translation wrapper) markers added by
   page-tafsir-source.php. */
.pq-tf-textmode--en  .pq-tf-ar { display: none; }
.pq-tf-textmode--ar  .pq-tf-en { display: none; }
.pq-tf-textmode--none .pq-tf-ar,
.pq-tf-textmode--none .pq-tf-en { display: none; }

/* When verses are hidden but commentary remains, drop the dashed top border
   from the commentary block so the card does not look like it has a hole. */
.pq-tf-textmode--none .tafsir-inline-commentary {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* Also apply EN/AR/none modes to the bismillah row at the top of each
   tafsir-rendered surah. The bismillah uses ayah-arabic + pq-bismillah-arabic
   plus pq-bismillah-translation - hide them in matching modes. */
.pq-tf-textmode--en  .pq-bismillah-arabic { display: none; }
.pq-tf-textmode--ar  .pq-bismillah-translation { display: none; }
.pq-tf-textmode--none .pq-bismillah-row { display: none; }

/* ==========================================================================
   v2.66.9z23g - Verse display toggle for Quran pages (EN / AR / EN+AR)
   Mirrors the tafsir toggle but with no 'none' mode (verses are the
   primary content on /quran/{n}/ and /ayah/{s}/{a}/). Targets:
     .pq-q-ar - Arabic + transliteration markers
     .pq-q-en - translator label + translation markers
     .pq-bismillah-arabic / .pq-bismillah-translation - bismillah row spans
   Wrappers live on .ayah-list (page-surah.php) and .verse-main-content
   (single-ayah.php). Cookie: pq_text_mode (shared with tafsir surface).
   ========================================================================== */
.pq-q-textmode--en .pq-q-ar { display: none; }
.pq-q-textmode--ar .pq-q-en { display: none; }
.pq-q-textmode--en .pq-bismillah-arabic { display: none; }
.pq-q-textmode--ar .pq-bismillah-translation { display: none; }

/* ==========================================================================
   v2.66.9z23f - Tafsir Research Workbench Rail (global)
   Promoted from template-parts/tafsir/mode-everyone.php inline <style> so
   the rail also renders correctly on /tafsir/{slug}/ and
   /tafsir/{slug}/?surah=N/. Identical visuals to the landing.
   ========================================================================== */

.pq-tf-rail-banner {
	background: linear-gradient(135deg, rgba(45,106,79,0.1), rgba(13,148,136,0.04));
	border: 1px solid rgba(45,106,79,0.25);
	border-radius: var(--radius-lg, 10px);
	padding: 14px;
	margin-bottom: 14px;
}
.pq-tf-rail-banner-eyebrow {
	font-size: 0.68rem;
	color: var(--pq-green-dark, #2d6a4f);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 700;
	margin-bottom: 4px;
}
.pq-tf-rail-banner-body {
	font-size: 0.83rem;
	color: var(--pq-gray-700, #4a5752);
	line-height: 1.5;
}
.pq-tf-rail-group { margin-bottom: 14px; }
.pq-tf-rail-group-label {
	font-size: 0.65rem;
	color: var(--pq-green-dark, #2d6a4f);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0 0 6px 4px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}
.pq-tf-rail-group-line {
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, rgba(45,106,79,0.3), transparent);
}
.pq-tf-tool {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	margin-bottom: 5px;
	background: var(--pq-cream, #f7f5ef);
	border: 1px solid var(--pq-divider, #e2dfd8);
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
	transition: border-color var(--transition-fast, .15s), background var(--transition-fast, .15s);
}
.pq-tf-tool:hover {
	border-color: var(--pq-green, #40916c);
	background: #fff;
	text-decoration: none;
}
.pq-tf-tool-ic {
	width: 30px;
	height: 30px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 14px;
	line-height: 1;
}
.pq-tf-tool-ic--emerald { background: rgba(16,185,129,0.15); color: #0c8062; }
.pq-tf-tool-ic--purple  { background: rgba(139,92,246,0.15); color: #6d40d6; }
.pq-tf-tool-ic--amber   { background: rgba(245,158,11,0.15); color: #b67000; }
.pq-tf-tool-ic--teal    { background: rgba(13,148,136,0.18); color: #086c63; }
.pq-tf-tool-ic--indigo  { background: rgba(99,102,241,0.18); color: #4348c4; }
.pq-tf-tool-ic--rose    { background: rgba(244,63,94,0.15); color: #c12a47; }
.pq-tf-tool-ic--green   { background: rgba(45,106,79,0.15); color: #2d6a4f; }
.pq-tf-tool-ic--violet  { background: rgba(168,85,247,0.15); color: #8442cc; }
.pq-tf-tool-ic--sky     { background: rgba(56,189,248,0.15); color: #1e7da6; }
.pq-tf-tool-ic--gold    { background: rgba(138,109,46,0.15); color: #8a6d2e; }
.pq-tf-tool-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pq-tf-tool-title {
	font-size: 0.825rem;
	font-weight: 700;
	color: var(--pq-gray-800, #1e2622);
	line-height: 1.3;
}
.pq-tf-tool-desc {
	font-size: 0.72rem;
	color: var(--pq-gray-600, #5b6b66);
	line-height: 1.4;
	margin-top: 2px;
}
.pq-tf-tool-arr {
	margin-left: auto;
	color: var(--pq-gray-500, #6b7872);
	font-size: 14px;
	align-self: center;
}


/* ==========================================================================
   v2.66.9z23j - Per-ayah Connections panel (collapsed-by-default, overflow-safe)
   Uses <details>/<summary> for native semantic collapse. Body holds the
   first 12 items always rendered; overflow items have [hidden] until
   "Show all" is clicked. Note about S:A regex bias is included.

   Overflow fix vs z23h: items use grid with `minmax(0, ...)` and inner
   text-overflow:ellipsis so long mufassir lists clip cleanly INSIDE the
   row instead of bleeding out the card on the right edge.
   ========================================================================== */
.pq-connections-card {
	margin: var(--space-lg, 1.5rem) 0;
	border: 1px solid rgba(46, 125, 50, 0.18);
	border-left: 3px solid var(--pq-green, #2E7D32);
	border-radius: var(--radius-lg, 12px);
	background: linear-gradient(135deg, rgba(46, 125, 50, 0.05), rgba(46, 125, 50, 0.01));
	overflow: hidden;
}

/* --- Collapsed-state summary (always visible) --- */
.pq-connections-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm, 0.5rem);
	padding: 12px var(--space-lg, 1.5rem);
	cursor: pointer;
	list-style: none;
	user-select: none;
	transition: background-color var(--transition-fast, 150ms ease);
}
.pq-connections-summary::-webkit-details-marker { display: none; }
.pq-connections-summary::marker              { content: ''; }
.pq-connections-summary:hover,
.pq-connections-summary:focus-visible {
	background: rgba(46, 125, 50, 0.06);
	outline: none;
}
.pq-connections-summary:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(46, 125, 50, 0.30);
}

.pq-connections-summary-main {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 10px;
	min-width: 0;
}

.pq-connections-icon {
	color: var(--pq-green-dark, #1B5E20);
	font-size: 1em;
	line-height: 1;
}

.pq-connections-title {
	font-weight: 600;
	color: var(--pq-green-dark, #1B5E20);
	font-size: 1.02rem;
	letter-spacing: 0.01em;
}

.pq-connections-count {
	color: var(--pq-gray-600, #757575);
	font-size: 0.88rem;
	font-weight: 400;
}

.pq-connections-chevron {
	color: var(--pq-green-dark, #1B5E20);
	font-size: 1em;
	flex-shrink: 0;
	transition: transform var(--transition-fast, 150ms ease);
}
.pq-connections-card[open] .pq-connections-chevron {
	transform: rotate(180deg);
}

/* --- Expanded body --- */
.pq-connections-body {
	padding: 0 var(--space-lg, 1.5rem) var(--space-md, 1rem);
	border-top: 1px dashed rgba(46, 125, 50, 0.20);
}

.pq-connections-list {
	list-style: none;
	margin: var(--space-sm, 0.5rem) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px;
}

@media (min-width: 760px) {
	.pq-connections-list {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 4px 16px;
	}
}

.pq-connection-item {
	margin: 0;
	padding: 0;
	min-width: 0; /* allow children to shrink inside grid track */
}

.pq-connection-link {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: baseline;
	gap: 4px 10px;
	padding: 6px 10px;
	border-radius: var(--radius-md, 8px);
	text-decoration: none;
	color: inherit;
	transition: background-color var(--transition-fast, 150ms ease);
	min-width: 0;
}

.pq-connection-link:hover,
.pq-connection-link:focus-visible {
	background: rgba(46, 125, 50, 0.08);
	outline: none;
}
.pq-connection-link:focus-visible {
	box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.40);
}

.pq-connection-ref {
	font-weight: 600;
	color: var(--pq-green-dark, #1B5E20);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pq-connection-qprefix {
	color: var(--pq-gray-500, #9E9E9E);
	font-weight: 500;
	font-size: 0.9em;
}

.pq-connection-surah {
	color: var(--pq-gray-600, #757575);
	font-weight: 400;
	font-size: 0.9em;
	font-style: italic;
	margin-left: 4px;
}

.pq-connection-citers {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
	font-size: 0.85rem;
	color: var(--pq-gray-700, #616161);
}

.pq-connection-citers-label {
	color: var(--pq-gray-500, #9E9E9E);
	font-style: italic;
	flex-shrink: 0;
}

.pq-connection-citers-list {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.pq-connection-count-badge {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--pq-green, #2E7D32);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1;
}

/* --- Show-all button --- */
.pq-connections-more {
	margin: var(--space-sm, 0.5rem) 0 0;
	padding-top: var(--space-sm, 0.5rem);
	border-top: 1px dashed rgba(46, 125, 50, 0.15);
	text-align: center;
}

.pq-connections-showall {
	display: inline-block;
	padding: 6px 16px;
	border: 1px solid rgba(46, 125, 50, 0.30);
	border-radius: 999px;
	background: #fff;
	color: var(--pq-green-dark, #1B5E20);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color var(--transition-fast, 150ms ease),
				border-color    var(--transition-fast, 150ms ease);
}
.pq-connections-showall:hover,
.pq-connections-showall:focus-visible {
	background: rgba(46, 125, 50, 0.08);
	border-color: rgba(46, 125, 50, 0.50);
	outline: none;
}
.pq-connections-showall:focus-visible {
	box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.30);
}

/* --- Methodology note --- */
.pq-connections-note {
	margin: var(--space-md, 1rem) 0 0;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.02);
	border-left: 2px solid rgba(46, 125, 50, 0.25);
	border-radius: var(--radius-sm, 4px);
	font-size: 0.78rem;
	color: var(--pq-gray-600, #757575);
	line-height: 1.5;
}
.pq-connections-note-label {
	font-weight: 600;
	color: var(--pq-gray-700, #616161);
	margin-right: 4px;
}


/* ==========================================================================
   v2.66.9z23k - Per-ayah Connections panel: multi-mufassir consensus mode
   Buckets connections into (A) consensus (cited by 2+ commentators) shown
   prominently, and (B) single-source mentions tucked into a nested <details>
   sub-card. Pills in the summary header announce both counts. Rows in the
   single-source bucket are visually de-emphasized so the user can see at a
   glance which references reflect cross-author agreement vs one author's
   internal cross-referencing habits.
   ========================================================================== */

/* --- Summary header: count pills (replaces the single 'N connections' label) --- */
.pq-connections-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.pq-connections-pill--consensus {
	background: rgba(46, 125, 50, 0.14);
	color: var(--pq-green-dark, #1B5E20);
	border: 1px solid rgba(46, 125, 50, 0.30);
}
.pq-connections-pill--single {
	background: rgba(0, 0, 0, 0.04);
	color: var(--pq-gray-700, #616161);
	border: 1px solid rgba(0, 0, 0, 0.10);
	font-weight: 500;
}

/* --- Sections (consensus block + single-source <details>) --- */
.pq-connections-section {
	margin: var(--space-md, 1rem) 0 0;
}
.pq-connections-section:first-of-type {
	margin-top: var(--space-sm, 0.5rem);
}

.pq-connections-section-title {
	margin: 0 0 6px;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--pq-green-dark, #1B5E20);
	letter-spacing: 0.01em;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
}
.pq-connections-section-sub {
	font-weight: 400;
	font-size: 0.78rem;
	color: var(--pq-gray-600, #757575);
	font-style: italic;
}

/* Single-source bucket = nested <details> --- summary header */
.pq-connections-section--single {
	margin-top: var(--space-md, 1rem);
	padding-top: var(--space-sm, 0.5rem);
	border-top: 1px dashed rgba(0, 0, 0, 0.08);
}
.pq-connections-section-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm, 0.5rem);
	cursor: pointer;
	list-style: none;
	user-select: none;
	padding: 4px 0;
	transition: color var(--transition-fast, 150ms ease);
}
.pq-connections-section-summary::-webkit-details-marker { display: none; }
.pq-connections-section-summary::marker              { content: ''; }
.pq-connections-section--single .pq-connections-section-title {
	color: var(--pq-gray-700, #616161);
	font-weight: 600;
}
.pq-connections-section-summary:hover .pq-connections-section-title,
.pq-connections-section-summary:focus-visible .pq-connections-section-title {
	color: var(--pq-green-dark, #1B5E20);
}
.pq-connections-section-summary:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px rgba(46, 125, 50, 0.20);
	border-radius: var(--radius-sm, 4px);
}
.pq-connections-chevron--sub {
	color: var(--pq-gray-500, #9E9E9E);
	font-size: 0.95em;
	flex-shrink: 0;
	transition: transform var(--transition-fast, 150ms ease);
}
.pq-connections-section--single[open] > .pq-connections-section-summary .pq-connections-chevron--sub {
	transform: rotate(180deg);
	color: var(--pq-green-dark, #1B5E20);
}

/* Empty consensus state */
.pq-connections-section--empty {
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.02);
	border-radius: var(--radius-sm, 4px);
}
.pq-connections-empty-note {
	margin: 4px 0 0;
	font-size: 0.85rem;
	color: var(--pq-gray-600, #757575);
	line-height: 1.5;
	font-style: italic;
}

/* --- Row variants: consensus rows pop, single-source rows recede --- */
.pq-connection-item--consensus .pq-connection-link {
	background: rgba(46, 125, 50, 0.03);
}
.pq-connection-item--consensus .pq-connection-link:hover,
.pq-connection-item--consensus .pq-connection-link:focus-visible {
	background: rgba(46, 125, 50, 0.10);
}
.pq-connection-item--consensus .pq-connection-count-badge {
	background: var(--pq-green-dark, #1B5E20);
}

.pq-connection-item--single .pq-connection-ref {
	font-weight: 500;
	color: var(--pq-gray-700, #616161);
}
.pq-connection-item--single .pq-connection-citers {
	font-size: 0.82rem;
	color: var(--pq-gray-600, #757575);
}
.pq-connection-item--single .pq-connection-count-badge {
	background: var(--pq-gray-500, #9E9E9E);
	color: #fff;
}

/* Tighten the nested list inside the single-source <details> body */
.pq-connections-section--single .pq-connections-list {
	margin-top: var(--space-sm, 0.5rem);
}
.pq-connections-section--single .pq-connections-more {
	margin-top: var(--space-sm, 0.5rem);
}

/* ============================================================
   v2.66.9z23l - Connections enhancements
   Heavy-citer view, repeat-mention counts, clickable citers,
   current-mufassir highlights, scroll-flash anchor
   ============================================================ */

/* Citer list: wrap to next line when 2+ citers (was nowrap/truncated in z23k) */
.pq-connection-citers-list--wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
	margin: 0.25rem 0 0 0;
	padding: 0;
	list-style: none;
}
.pq-citer {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
}
.pq-citer-details {
	display: inline-block;
	margin: 0;
}
.pq-citer-summary {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	cursor: pointer;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: var(--pq-gray-100, #F5F5F5);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	font-size: 0.82rem;
	color: var(--pq-gray-700, #424242);
	list-style: none;
	white-space: nowrap;
	line-height: 1.3;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pq-citer-summary::-webkit-details-marker { display: none; }
.pq-citer-summary::marker { content: ''; }
.pq-citer-summary:hover {
	background: var(--pq-gray-200, #EEEEEE);
	border-color: var(--pq-gray-300, #E0E0E0);
}
.pq-citer-name {
	font-weight: 500;
}
.pq-citer-occ {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0 0.3rem;
	border-radius: 6px;
	background: var(--pq-primary-100, #E8F5E9);
	color: var(--pq-primary-800, #2E7D32);
	margin-left: 0.15rem;
}
.pq-citer-caret {
	font-size: 0.65rem;
	color: var(--pq-gray-500, #9E9E9E);
	transition: transform 0.15s ease;
}
.pq-citer-details[open] > .pq-citer-summary .pq-citer-caret {
	transform: rotate(180deg);
}
.pq-citer-passages {
	list-style: none;
	margin: 0.4rem 0 0.4rem 0;
	padding: 0.4rem 0.6rem;
	background: var(--pq-gray-50, #FAFAFA);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 6px;
	font-size: 0.82rem;
}
.pq-citer-passages li {
	margin: 0;
	padding: 0.15rem 0;
}
.pq-citer-passage-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--pq-primary-700, #388E3C);
	text-decoration: none;
}
.pq-citer-passage-link:hover {
	text-decoration: underline;
	color: var(--pq-primary-800, #2E7D32);
}
.pq-citer-passage-icon {
	font-size: 0.85rem;
	opacity: 0.7;
}

/* Current mufassir highlight (in citer chips) */
.pq-citer--current .pq-citer-summary {
	background: var(--pq-primary-100, #E8F5E9);
	border-color: var(--pq-primary-300, #A5D6A7);
}
.pq-citer--current .pq-citer-name {
	font-weight: 700;
	color: var(--pq-primary-900, #1B5E20);
}

/* Row that contains the current mufassir among its citers */
.pq-connection-item--has-current {
	background: rgba(76, 175, 80, 0.05);
	border-left: 3px solid var(--pq-primary-400, #81C784);
	padding-left: 0.5rem;
}

/* Scroll-flash highlight when arriving via #qhxref=S:A fragment */
@keyframes pq-conn-flash {
	0% { background-color: rgba(255, 235, 59, 0.45); }
	60% { background-color: rgba(255, 235, 59, 0.45); }
	100% { background-color: transparent; }
}
.pq-connection-item--flash {
	animation: pq-conn-flash 2.4s ease-out;
	border-radius: 6px;
}

/* Third pill in summary header (heavy-citer count) */
.pq-connections-pill--heavy {
	background: var(--pq-primary-50, #E8F5E9);
	color: var(--pq-primary-800, #2E7D32);
	border-color: var(--pq-primary-200, #C8E6C9);
}

/* "By commentator" nested section */
.pq-connections-section--heavy {
	margin-top: var(--space-md, 1rem);
}
.pq-connections-section--heavy .pq-connections-section-header {
	color: var(--pq-primary-800, #2E7D32);
}
.pq-connections-heavy-list {
	list-style: none;
	margin: var(--space-sm, 0.5rem) 0 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.pq-heavy-item {
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}
.pq-heavy-item--current {
	border-color: var(--pq-primary-300, #A5D6A7);
	background: var(--pq-primary-50, #F1F8E9);
}
.pq-heavy-details {
	margin: 0;
}
.pq-heavy-summary {
	cursor: pointer;
	padding: 0.5rem 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.92rem;
	list-style: none;
}
.pq-heavy-summary::-webkit-details-marker { display: none; }
.pq-heavy-summary::marker { content: ''; }
.pq-heavy-summary:hover {
	background: var(--pq-gray-50, #FAFAFA);
}
.pq-heavy-name {
	font-weight: 600;
	color: var(--pq-gray-900, #212121);
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pq-heavy-item--current .pq-heavy-name {
	color: var(--pq-primary-900, #1B5E20);
}
.pq-heavy-counts {
	display: inline-flex;
	gap: 0.35rem;
	font-size: 0.78rem;
	color: var(--pq-gray-600, #757575);
	flex: 0 0 auto;
}
.pq-heavy-unique,
.pq-heavy-total {
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: var(--pq-gray-100, #F5F5F5);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	font-weight: 600;
	white-space: nowrap;
}
.pq-heavy-total {
	background: var(--pq-primary-50, #E8F5E9);
	color: var(--pq-primary-800, #2E7D32);
	border-color: var(--pq-primary-200, #C8E6C9);
}
.pq-heavy-caret {
	font-size: 0.7rem;
	color: var(--pq-gray-500, #9E9E9E);
	transition: transform 0.15s ease;
	flex: 0 0 auto;
}
.pq-heavy-details[open] > .pq-heavy-summary .pq-heavy-caret {
	transform: rotate(180deg);
}
.pq-heavy-targets {
	list-style: none;
	margin: 0;
	padding: 0.4rem 0.75rem 0.6rem 0.75rem;
	border-top: 1px solid var(--pq-gray-200, #EEEEEE);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
	background: var(--pq-gray-50, #FAFAFA);
}
.pq-heavy-target {
	margin: 0;
	padding: 0;
}
.pq-heavy-target-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	font-size: 0.8rem;
	color: var(--pq-gray-700, #424242);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pq-heavy-target-link:hover {
	background: var(--pq-primary-50, #E8F5E9);
	border-color: var(--pq-primary-200, #C8E6C9);
	color: var(--pq-primary-800, #2E7D32);
}
.pq-heavy-target-occ {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--pq-primary-800, #2E7D32);
	margin-left: 0.15rem;
}

/* Responsive: stack counts under name on narrow screens */
@media (max-width: 480px) {
	.pq-heavy-summary {
		flex-wrap: wrap;
	}
	.pq-heavy-name {
		flex: 1 1 100%;
		white-space: normal;
	}
}

/* ============================================================
   v2.66.9z23m - Citer chips as direct links (drop popout)
   Replaces <details>/<summary> popout with a single <a> linking
   to /tafsir/{slug}/#qhxref=S:A
   ============================================================ */
.pq-citer-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: var(--pq-gray-100, #F5F5F5);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	font-size: 0.82rem;
	color: var(--pq-gray-700, #424242);
	text-decoration: none;
	line-height: 1.3;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pq-citer-link:hover,
.pq-citer-link:focus {
	background: var(--pq-primary-50, #E8F5E9);
	border-color: var(--pq-primary-200, #C8E6C9);
	color: var(--pq-primary-800, #2E7D32);
	text-decoration: none;
}
.pq-citer--current .pq-citer-link {
	background: var(--pq-primary-100, #E8F5E9);
	border-color: var(--pq-primary-300, #A5D6A7);
}
.pq-citer--current .pq-citer-link .pq-citer-name {
	font-weight: 700;
	color: var(--pq-primary-900, #1B5E20);
}

/* ============================================================
   v2.66.10a - Tafsir Techniques landing section + Connections page
   ============================================================ */

/* --- Techniques teaser block on /tafsir/ landing ------------- */
.pq-tafsir-techniques {
	margin: var(--space-xl, 2rem) 0;
	padding: 0 var(--space-md, 1rem);
}
.pq-tafsir-techniques-inner {
	max-width: var(--pq-content-max, 1200px);
	margin: 0 auto;
}
.pq-tafsir-techniques-header {
	margin-bottom: var(--space-md, 1rem);
}
.pq-tafsir-techniques-h2 {
	font-size: 1.5rem;
	margin: 0 0 0.25rem 0;
	color: var(--pq-primary-900, #1B5E20);
}
.pq-tafsir-techniques-sub {
	margin: 0;
	color: var(--pq-gray-600, #757575);
	font-size: 0.95rem;
}
.pq-tafsir-techniques-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--space-md, 1rem);
}
.pq-tafsir-technique-card {
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pq-tafsir-technique-card:hover {
	border-color: var(--pq-primary-300, #A5D6A7);
	box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
	transform: translateY(-1px);
}
.pq-tafsir-technique-link {
	display: block;
	padding: var(--space-md, 1rem);
	color: inherit;
	text-decoration: none;
}
.pq-tafsir-technique-link:hover { text-decoration: none; }
.pq-tafsir-technique-title {
	margin: 0 0 0.4rem 0;
	font-size: 1.15rem;
	color: var(--pq-primary-900, #1B5E20);
}
.pq-tafsir-technique-desc {
	margin: 0 0 0.75rem 0;
	font-size: 0.9rem;
	color: var(--pq-gray-700, #424242);
	line-height: 1.5;
}
.pq-tafsir-technique-cta {
	display: inline-block;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--pq-primary-700, #388E3C);
}

/* v2.66.10m: Optional icon on landing technique cards.
   Renders above the card title, in primary green. */
.pq-tafsir-technique-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: var(--pq-primary-50, #E8F5E9);
	color: var(--pq-primary-700, #388E3C);
	font-size: 1.3rem;
	line-height: 1;
	margin-bottom: 0.6rem;
}

/* v2.66.10m: Techniques sidebar card (used on tafsir sub-pages).
   Shared template-parts/tafsir/sidebar-techniques.php. */
.pq-tf-techniques-card .pq-tf-techniques-card-title {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}
.pq-tf-techniques-card-graphic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: var(--pq-primary-50, #E8F5E9);
	color: var(--pq-primary-700, #388E3C);
	flex: 0 0 auto;
}
.pq-tf-techniques-card-graphic svg {
	display: block;
}
.pq-tf-techniques-item strong {
	color: var(--pq-primary-900, #1B5E20);
}

/* ============================================================
   v2.66.10n - Mushaf View landing page (/tafsir/mushaf/)
   ============================================================ */
.pq-mushaf-landing {
	max-width: var(--pq-content-max, 1200px);
	margin: 0 auto;
	padding: var(--space-lg, 1.5rem) var(--space-md, 1rem) var(--space-xl, 2rem);
}
.pq-mushaf-landing-hero {
	margin-bottom: var(--space-xl, 2rem);
	padding-bottom: var(--space-md, 1rem);
	border-bottom: 1px solid var(--pq-gray-200, #EEEEEE);
}
.pq-mushaf-landing-subtitle {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--pq-gray-700, #424242);
	max-width: 760px;
}
.pq-mushaf-landing-section {
	margin: var(--space-xl, 2rem) 0;
}
.pq-mushaf-landing-h2 {
	font-size: 1.5rem;
	margin: 0 0 0.4rem 0;
	color: var(--pq-primary-900, #1B5E20);
}
/* v2.66.10o: Mushaf View layout preview (schematic SVG) */
.pq-mushaf-landing-preview-intro {
	margin: 0 0 var(--space-md, 1rem) 0;
	color: var(--pq-gray-700, #555);
	font-size: 0.95rem;
	max-width: 760px;
}
.pq-mushaf-landing-preview-figure {
	margin: 0;
	padding: var(--space-md, 1rem);
	background: var(--pq-gray-50, #fafafa);
	border: 1px solid var(--pq-gray-200, #e0e0e0);
	border-radius: 10px;
}
.pq-mushaf-landing-preview-svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 460px;
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-label {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	fill: var(--pq-primary-900, #1B5E20);
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-sub {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 11px;
	fill: var(--pq-gray-600, #757575);
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-line {
	stroke: var(--pq-gray-300, #cfcfcf);
	stroke-width: 1.4;
	stroke-linecap: round;
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-line-thick {
	stroke: var(--pq-gray-500, #999);
	stroke-width: 2.2;
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-label-quran-header {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	fill: #ffffff;
	letter-spacing: 0.04em;
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-bismillah {
	font-family: "Amiri", "Scheherazade", "Times New Roman", serif;
	font-size: 22px;
	font-weight: 700;
	fill: var(--pq-primary-900, #1B5E20);
	letter-spacing: 0.4em;
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-pill-text {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 11px;
	font-weight: 600;
	fill: var(--pq-primary-900, #1B5E20);
}
.pq-mushaf-landing-preview-svg .pq-mml-prev-pill-text-on {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 11px;
	font-weight: 700;
	fill: #ffffff;
}
.pq-mushaf-landing-preview-caption {
	margin: 0.6rem 0 0 0;
	font-size: 0.85rem;
	color: var(--pq-gray-600, #757575);
	font-style: italic;
	text-align: center;
}
.pq-mushaf-landing-lede {
	margin: 0 0 var(--space-md, 1rem) 0;
	color: var(--pq-gray-600, #757575);
	font-size: 0.95rem;
	max-width: 760px;
}

/* Etymology grid - 4 cards in a responsive grid. */
.pq-mushaf-landing-etymology-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--space-md, 1rem);
}
.pq-mushaf-landing-etymology-card {
	background: var(--pq-cream, #FAF8F3);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	padding: var(--space-md, 1rem);
}
.pq-mushaf-landing-etymology-h3 {
	margin: 0 0 0.4rem 0;
	font-size: 1.05rem;
	color: var(--pq-primary-900, #1B5E20);
}
.pq-mushaf-landing-etymology-card p {
	margin: 0;
	font-size: 0.93rem;
	line-height: 1.55;
	color: var(--pq-gray-700, #424242);
}

/* Picker form - mirrors connections-search-form layout. */
.pq-mushaf-landing-form {
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	padding: var(--space-md, 1rem);
}
.pq-mushaf-landing-form-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--space-sm, 0.6rem) var(--space-md, 1rem);
}
.pq-mushaf-landing-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}
.pq-mushaf-landing-field-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--pq-gray-600, #757575);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.pq-mushaf-landing-field select,
.pq-mushaf-landing-field input {
	border: 1px solid var(--pq-gray-300, #BDBDBD);
	border-radius: 6px;
	padding: 0.5rem 0.7rem;
	font-size: 0.95rem;
	background: #fff;
	min-width: 0;
}
.pq-mushaf-landing-field select:focus,
.pq-mushaf-landing-field input:focus {
	outline: none;
	border-color: var(--pq-primary-700, #388E3C);
	box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.18);
}
.pq-mushaf-landing-field--combined input {
	width: 110px;
}
.pq-mushaf-landing-or {
	font-size: 0.85rem;
	color: var(--pq-gray-500, #9E9E9E);
	padding: 0 0.25rem 0.5rem;
	align-self: flex-end;
}
.pq-mushaf-landing-go {
	background: var(--pq-primary-700, #388E3C);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 0.55rem 1.1rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.pq-mushaf-landing-go:hover,
.pq-mushaf-landing-go:focus {
	background: var(--pq-primary-900, #1B5E20);
}
.pq-mushaf-landing-status {
	margin: 0.6rem 0 0 0;
	font-size: 0.88rem;
	color: var(--pq-gray-600, #757575);
	min-height: 1.1em;
}

/* Featured ayah cards. */
.pq-mushaf-landing-featured-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--space-md, 1rem);
}
.pq-mushaf-landing-featured-card {
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pq-mushaf-landing-featured-card:hover {
	border-color: var(--pq-primary-300, #A5D6A7);
	box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
	transform: translateY(-1px);
}
.pq-mushaf-landing-featured-link {
	display: block;
	padding: var(--space-md, 1rem);
	color: inherit;
	text-decoration: none;
}
.pq-mushaf-landing-featured-link:hover { text-decoration: none; }
.pq-mushaf-landing-featured-ref {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--pq-primary-700, #388E3C);
	background: var(--pq-primary-50, #E8F5E9);
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	margin-bottom: 0.5rem;
}
.pq-mushaf-landing-featured-label {
	margin: 0 0 0.4rem 0;
	font-size: 1.1rem;
	color: var(--pq-primary-900, #1B5E20);
}
.pq-mushaf-landing-featured-why {
	margin: 0 0 0.7rem 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--pq-gray-700, #424242);
}
.pq-mushaf-landing-featured-cta {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pq-primary-700, #388E3C);
}

/* "What you'll see" hint list. */
.pq-mushaf-landing-hint-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.7rem;
}
.pq-mushaf-landing-hint-list li {
	padding: 0.7rem 0.9rem;
	background: var(--pq-cream, #FAF8F3);
	border-left: 3px solid var(--pq-primary-300, #A5D6A7);
	border-radius: 0 6px 6px 0;
	font-size: 0.93rem;
	line-height: 1.5;
	color: var(--pq-gray-700, #424242);
}
.pq-mushaf-landing-hint-list li strong {
	color: var(--pq-primary-900, #1B5E20);
}

/* Mufassirun grid - 5 cards. */
.pq-mushaf-landing-muf-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--space-md, 1rem);
}
.pq-mushaf-landing-muf-card {
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	padding: var(--space-md, 1rem);
}
.pq-mushaf-landing-muf-name {
	margin: 0 0 0.5rem 0;
	font-size: 1.05rem;
	color: var(--pq-primary-900, #1B5E20);
}
.pq-mushaf-landing-muf-meta {
	margin: 0 0 0.6rem 0;
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: 0.2rem 0.5rem;
	font-size: 0.85rem;
}
.pq-mushaf-landing-muf-meta dt {
	color: var(--pq-gray-600, #757575);
	font-weight: 600;
}
.pq-mushaf-landing-muf-meta dd {
	margin: 0;
	color: var(--pq-gray-800, #212121);
}
.pq-mushaf-landing-muf-note {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--pq-gray-700, #424242);
}
.pq-mushaf-landing-muf-foot {
	margin: var(--space-md, 1rem) 0 0 0;
}
.pq-mushaf-landing-muf-foot-link {
	color: var(--pq-primary-700, #388E3C);
	font-weight: 600;
	text-decoration: none;
}
.pq-mushaf-landing-muf-foot-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
	.pq-mushaf-landing-or { display: none; }
	.pq-mushaf-landing-field--combined input { width: 100%; }
	.pq-mushaf-landing-go { width: 100%; }
}

/* --- Connections technique page ------------------------------ */
.pq-connections-page {
	max-width: var(--pq-content-max, 1200px);
	margin: 0 auto;
	padding: var(--space-lg, 1.5rem) var(--space-md, 1rem) var(--space-xl, 2rem);
}
.pq-connections-page-hero {
	margin-bottom: var(--space-xl, 2rem);
	padding-bottom: var(--space-md, 1rem);
	border-bottom: 1px solid var(--pq-gray-200, #EEEEEE);
}
.pq-connections-page-eyebrow {
	margin: 0 0 0.25rem 0;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--pq-primary-700, #388E3C);
}
.pq-connections-page-title {
	margin: 0 0 0.5rem 0;
	font-size: 2.2rem;
	line-height: 1.15;
	color: var(--pq-gray-900, #212121);
}
.pq-connections-page-subtitle {
	margin: 0 0 var(--space-md, 1rem) 0;
	font-size: 1.02rem;
	color: var(--pq-gray-700, #424242);
	line-height: 1.55;
	max-width: 60ch;
}
.pq-connections-page-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
	align-items: center;
	font-size: 0.86rem;
	color: var(--pq-gray-600, #757575);
	margin-top: var(--space-sm, 0.5rem);
}
.pq-connections-page-stat {
	display: inline-flex;
	flex-direction: column;
	gap: 0.05rem;
}
.pq-connections-page-stat-num {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--pq-primary-800, #2E7D32);
}
.pq-connections-page-stat-label {
	font-size: 0.78rem;
	color: var(--pq-gray-600, #757575);
}
.pq-connections-page-stat-meta {
	font-size: 0.78rem;
	font-style: italic;
	color: var(--pq-gray-500, #9E9E9E);
}
.pq-connections-page-refresh {
	margin-left: auto;
	padding: 0.4rem 0.85rem;
	font-size: 0.82rem;
	background: var(--pq-primary-50, #E8F5E9);
	border: 1px solid var(--pq-primary-300, #A5D6A7);
	border-radius: 6px;
	color: var(--pq-primary-800, #2E7D32);
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.pq-connections-page-refresh:hover:not(:disabled) {
	background: var(--pq-primary-100, #C8E6C9);
}
.pq-connections-page-refresh:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* --- Sections -------------------------------------------------- */
.pq-connections-page .pq-connections-section {
	margin-bottom: var(--space-xl, 2rem);
}
.pq-connections-section-h2 {
	font-size: 1.4rem;
	margin: 0 0 0.4rem 0;
	color: var(--pq-gray-900, #212121);
}
.pq-connections-section-lede {
	margin: 0 0 var(--space-md, 1rem) 0;
	color: var(--pq-gray-600, #757575);
	font-size: 0.93rem;
}

/* --- Search form ---------------------------------------------- */
.pq-connections-search-form {
	background: var(--pq-gray-50, #FAFAFA);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	padding: var(--space-md, 1rem);
}
.pq-connections-search-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
}
.pq-connections-search-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
}
.pq-connections-search-field--combined { min-width: 120px; }
.pq-connections-search-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--pq-gray-700, #424242);
}
.pq-connections-search-field select,
.pq-connections-search-field input {
	padding: 0.4rem 0.55rem;
	border: 1px solid var(--pq-gray-300, #E0E0E0);
	border-radius: 6px;
	font-size: 0.92rem;
	background: #fff;
	min-width: 0;
}
.pq-connections-search-field select:focus,
.pq-connections-search-field input:focus {
	border-color: var(--pq-primary-400, #81C784);
	outline: 2px solid rgba(76, 175, 80, 0.2);
	outline-offset: 1px;
}
.pq-connections-search-or {
	align-self: center;
	margin-top: 1.2rem;
	color: var(--pq-gray-500, #9E9E9E);
	font-size: 0.85rem;
	font-style: italic;
}
.pq-connections-search-go {
	padding: 0.5rem 1rem;
	font-size: 0.95rem;
	font-weight: 600;
	background: var(--pq-primary-700, #388E3C);
	color: #fff;
	border: 1px solid var(--pq-primary-800, #2E7D32);
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.pq-connections-search-go:hover {
	background: var(--pq-primary-800, #2E7D32);
}
.pq-connections-search-status {
	margin: 0.5rem 0 0 0;
	font-size: 0.85rem;
	color: var(--pq-gray-600, #757575);
	min-height: 1.2em;
}
.pq-connections-search-status--error {
	color: #c62828;
	font-weight: 500;
}
.pq-connections-search-result {
	margin-top: var(--space-md, 1rem);
	padding: var(--space-md, 1rem);
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
}
.pq-connections-search-result-heading {
	margin: 0 0 0.4rem 0;
	font-size: 1.15rem;
	color: var(--pq-primary-900, #1B5E20);
}
.pq-connections-search-result-open {
	display: inline-block;
	margin-bottom: 0.75rem;
	font-size: 0.86rem;
	color: var(--pq-primary-700, #388E3C);
	text-decoration: none;
}
.pq-connections-search-result-open:hover { text-decoration: underline; }

/* --- Showcase list -------------------------------------------- */
.pq-connections-showcase-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-md, 1rem);
	counter-reset: pq-showcase;
}
.pq-connections-showcase-item {
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	overflow: hidden;
	counter-increment: pq-showcase;
}
.pq-connections-showcase-header {
	padding: 0.75rem var(--space-md, 1rem);
	background: var(--pq-gray-50, #FAFAFA);
	border-bottom: 1px solid var(--pq-gray-200, #EEEEEE);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	justify-content: space-between;
}
.pq-connections-showcase-header::before {
	content: "#" counter(pq-showcase);
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--pq-gray-500, #9E9E9E);
}
.pq-connections-showcase-ref {
	flex: 1 1 auto;
	font-weight: 600;
	color: var(--pq-primary-800, #2E7D32);
	text-decoration: none;
}
.pq-connections-showcase-ref:hover { text-decoration: underline; }
.pq-connections-showcase-q { font-weight: 700; }
.pq-connections-showcase-surah {
	font-weight: 400;
	color: var(--pq-gray-600, #757575);
	font-style: italic;
	margin-left: 0.25rem;
}
.pq-connections-showcase-counts {
	display: inline-flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}
.pq-connections-showcase-count-pill {
	font-size: 0.78rem;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: var(--pq-primary-50, #E8F5E9);
	border: 1px solid var(--pq-primary-200, #C8E6C9);
	color: var(--pq-primary-800, #2E7D32);
}
.pq-connections-showcase-count-pill strong { font-weight: 700; }
.pq-connections-showcase-panel {
	padding: var(--space-md, 1rem);
}

/* --- Leaderboards grid ---------------------------------------- */
.pq-connections-leaderboards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--space-md, 1rem);
}
.pq-connections-leaderboard {
	background: #fff;
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.pq-connections-leaderboard-header {
	padding: 0.75rem var(--space-md, 1rem);
	background: var(--pq-gray-50, #FAFAFA);
	border-bottom: 1px solid var(--pq-gray-200, #EEEEEE);
}
.pq-connections-leaderboard-title {
	margin: 0;
	font-size: 1.02rem;
	color: var(--pq-gray-900, #212121);
}
.pq-connections-leaderboard-sub {
	margin: 0.1rem 0 0 0;
	font-size: 0.78rem;
	color: var(--pq-gray-600, #757575);
}
.pq-connections-leaderboard-list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: pq-lb;
}
.pq-connections-leaderboard-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem var(--space-md, 1rem);
	border-bottom: 1px solid var(--pq-gray-100, #F5F5F5);
	counter-increment: pq-lb;
	font-size: 0.9rem;
}
.pq-connections-leaderboard-row:last-child { border-bottom: none; }
.pq-connections-leaderboard-row::before {
	content: counter(pq-lb);
	display: inline-block;
	width: 1.6rem;
	flex: 0 0 auto;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--pq-gray-500, #9E9E9E);
}
.pq-connections-leaderboard-name {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--pq-primary-800, #2E7D32);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pq-connections-leaderboard-name:hover { text-decoration: underline; }
.pq-connections-leaderboard-q { font-weight: 700; }
.pq-connections-leaderboard-surah {
	color: var(--pq-gray-600, #757575);
	font-style: italic;
	margin-left: 0.2rem;
	font-weight: 400;
}
.pq-connections-leaderboard-metrics {
	display: inline-flex;
	gap: 0.4rem;
	flex: 0 0 auto;
}
.pq-connections-leaderboard-metric {
	font-size: 0.78rem;
	display: inline-flex;
	align-items: baseline;
	gap: 0.2rem;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: var(--pq-gray-100, #F5F5F5);
	border: 1px solid var(--pq-gray-200, #EEEEEE);
	color: var(--pq-gray-700, #424242);
	white-space: nowrap;
}
.pq-connections-leaderboard-metric strong {
	font-weight: 700;
	color: var(--pq-primary-800, #2E7D32);
}
.pq-connections-leaderboard-metric-label { font-weight: 400; }
.pq-connections-leaderboard-empty {
	margin: 0;
	padding: var(--space-md, 1rem);
	color: var(--pq-gray-500, #9E9E9E);
	font-style: italic;
	font-size: 0.88rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
	.pq-connections-page-title { font-size: 1.7rem; }
	.pq-connections-page-stats { gap: 0.75rem; }
	.pq-connections-page-refresh { margin-left: 0; }
	.pq-connections-search-or { display: none; }
	.pq-connections-search-field { width: 100%; }
	.pq-connections-search-field select,
	.pq-connections-search-field input { width: 100%; }
	.pq-connections-search-go { width: 100%; }
	.pq-connections-showcase-header { flex-direction: column; align-items: flex-start; }
	.pq-connections-leaderboard-row { flex-wrap: wrap; }
	.pq-connections-leaderboard-name { white-space: normal; }
}

/* v2.66.10b - Admin-only cron status indicator on Connections page */
.pq-connections-page-cron {
	display: inline-flex;
	flex-direction: column;
	gap: 0.1rem;
	font-size: 0.74rem;
	color: var(--pq-gray-500, #9E9E9E);
	font-style: italic;
	margin-left: auto;
	margin-right: 0.6rem;
	text-align: right;
}
.pq-connections-page-cron-line { white-space: nowrap; }
.pq-connections-page-cron-line--warn {
	color: #c62828;
	font-style: normal;
	font-weight: 600;
}
/* When cron status is present, the refresh button no longer needs margin-left:auto */
.pq-connections-page-cron + .pq-connections-page-refresh {
	margin-left: 0;
}
@media (max-width: 600px) {
	.pq-connections-page-cron {
		margin-left: 0;
		margin-right: 0;
		text-align: left;
	}
}

/* ============================================================
   v2.66.23  Islamic Topics: "Read full article" link in
   about-panel <details> blocks, plus single-topic page styling.
   ============================================================ */

.pq-ical-about-panel .pq-info-content .pq-info-readmore {
    margin-top: var(--space-md);
    margin-bottom: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.pq-ical-about-panel .pq-info-content .pq-info-readmore a {
    color: var(--pq-accent, #b87333);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.pq-ical-about-panel .pq-info-content .pq-info-readmore a:hover,
.pq-ical-about-panel .pq-info-content .pq-info-readmore a:focus {
    border-bottom-color: currentColor;
}

/* Single-topic article body: roomy serif paragraphs to match event articles. */
.pq-topic-single .pq-topic-deck {
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--pq-charcoal);
    margin: var(--space-md) 0 var(--space-lg);
    font-style: italic;
    text-align: center;
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
}

.pq-topic-single .pq-event-content p {
    margin-bottom: var(--space-md);
    line-height: 1.75;
}

.pq-topic-single .pq-event-content a {
    color: var(--pq-accent, #b87333);
    text-decoration: none;
    border-bottom: 1px solid rgba(184, 115, 51, 0.35);
    transition: border-color 0.15s ease;
}

.pq-topic-single .pq-event-content a:hover,
.pq-topic-single .pq-event-content a:focus {
    border-bottom-color: currentColor;
}

/* ============================================================
   Coverage notice (v2.66.24)
   Honest disclosure when a collection is partially populated.
   ============================================================ */
.pq-hc-coverage-notice {
    background: #fff8e1;
    border-left: 4px solid #d97706;
    border-radius: 6px;
    padding: 1rem 1.125rem;
    margin: 1rem 0 1.25rem;
    color: #4a3a0e;
}
.pq-hc-coverage-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pq-hc-coverage-icon {
    font-size: 1.125rem;
    line-height: 1;
    color: #d97706;
}
.pq-hc-coverage-head strong {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}
.pq-hc-coverage-pct {
    margin-left: auto;
    font-size: 0.8125rem;
    background: #fde68a;
    color: #78350f;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}
.pq-hc-coverage-notice .pq-hc-prose {
    color: #4a3a0e;
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* ============================================================
   Hadith prev/next nav (v2.66.25) - mirrors ayah verse-nav,
   with a stacked center cell (collection / book).
   ============================================================ */
.pq-hadith-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    line-height: 1.2;
}
.pq-hadith-nav-collection {
    font-size: 0.75rem;
    color: var(--pq-gray-500);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.pq-hadith-nav-collection:hover {
    color: var(--pq-green-dark);
    text-decoration: underline;
}
.pq-hadith-nav-book {
    font-weight: 600;
}
.verse-nav-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   Event banner (v2.66.26) - dismissible homepage observance card.
   Mockup #2 (card style) with green left accent.
   ============================================================ */
.pq-event-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1100px;
    margin: 1.25rem auto 0;
    padding: 1rem 1.125rem;
    background: #ffffff;
    border: 1px solid #c7e0d3;
    border-left: 4px solid var(--pq-green, #1e6c4a);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(30, 108, 74, 0.08);
    box-sizing: border-box;
}
.pq-event-banner-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pq-green, #1e6c4a) 0%, var(--pq-green-light, #2d8a5f) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pq-event-banner-icon svg {
    width: 22px;
    height: 22px;
}
.pq-event-banner-body {
    flex: 1 1 auto;
    min-width: 0;
}
.pq-event-banner-eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pq-green, #1e6c4a);
    margin-bottom: 0.125rem;
    line-height: 1.2;
}
.pq-event-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pq-gray-900, #111827);
    margin: 0 0 0.125rem;
    line-height: 1.3;
}
.pq-event-banner-meta {
    font-size: 0.8125rem;
    color: var(--pq-gray-600, #4b5563);
    line-height: 1.4;
}
.pq-event-banner-cta {
    flex: 0 0 auto;
    background: var(--pq-green, #1e6c4a);
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}
.pq-event-banner-cta:hover,
.pq-event-banner-cta:focus {
    background: var(--pq-green-dark, #0f4a32);
    color: #ffffff;
    text-decoration: none;
}
.pq-event-banner-close {
    position: absolute;
    top: 0.375rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--pq-gray-400, #9ca3af);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.pq-event-banner-close:hover,
.pq-event-banner-close:focus {
    color: var(--pq-gray-800, #1f2937);
    background: rgba(0,0,0,0.04);
}
@media (max-width: 640px) {
    .pq-event-banner {
        flex-wrap: wrap;
        padding: 0.875rem 0.875rem 0.875rem 1rem;
        gap: 0.75rem;
    }
    .pq-event-banner-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
    .pq-event-banner-icon svg {
        width: 18px;
        height: 18px;
    }
    .pq-event-banner-title {
        font-size: 0.9375rem;
    }
    .pq-event-banner-meta {
        font-size: 0.75rem;
    }
    .pq-event-banner-cta {
        flex: 1 1 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
}

/* ============================================================
   v2.66.28: Amazon Affiliate sidebar card
   ============================================================ */
.pq-affiliate-card { margin-top: 1rem; }
.pq-affiliate-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pq-affiliate-item + .pq-affiliate-item {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--pq-gray-200, #e5e7eb);
}
.pq-affiliate-link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 6px 4px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}
.pq-affiliate-link:hover,
.pq-affiliate-link:focus {
    background: var(--pq-green-pale, rgba(45,106,79,0.06));
    text-decoration: none;
}
.pq-affiliate-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 76px;
    background: var(--pq-gray-100, #f3f4f6);
    border-radius: 3px;
    overflow: hidden;
    display: block;
}
.pq-affiliate-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pq-affiliate-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}
.pq-affiliate-title {
    font-weight: 600;
    color: var(--pq-green-dark, #1b4332);
    font-size: 0.92rem;
}
.pq-affiliate-note {
    font-size: 0.78rem;
    color: var(--pq-gray-600, #666);
}
.pq-affiliate-cta {
    font-size: 0.78rem;
    color: var(--pq-green, #2d6a4f);
    font-weight: 600;
    margin-top: 2px;
}
.pq-affiliate-link:hover .pq-affiliate-cta {
    text-decoration: underline;
}
.pq-affiliate-disclosure {
    margin: 0.75rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pq-gray-200, #e5e7eb);
    font-size: 0.72rem;
    color: var(--pq-gray-600, #6b7280);
    line-height: 1.4;
    font-style: italic;
}

/* ============================================================
   v2.66.28: Contact form math captcha row
   ============================================================ */
.pq-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: var(--pq-gray-50, #f9fafb);
    border: 1px solid var(--pq-gray-200, #e5e7eb);
    border-radius: 6px;
    margin-bottom: var(--space-md, 1rem);
}
.pq-captcha-row label {
    font-weight: 600;
    color: var(--pq-charcoal, #1a1a2e);
    margin: 0;
    font-size: 0.92rem;
}
.pq-captcha-row .pq-captcha-question {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #fff;
    padding: 4px 10px;
    border: 1px solid var(--pq-gray-300, #d1d5db);
    border-radius: 4px;
    font-size: 0.95rem;
}
.pq-captcha-row input[type="text"] {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid var(--pq-gray-300, #d1d5db);
    border-radius: 4px;
    font-size: 0.95rem;
}

/* v2.66.29: affiliate card heading line 2 (subtitle) */
.pq-affiliate-heading { margin-bottom: 2px; }
.pq-affiliate-subheading {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    color: var(--pq-gray-600, #6b7280);
    font-style: italic;
    line-height: 1.35;
}

/* ============================================================
 * v2.66.30: Verse + Context translator card
 * ============================================================ */

/* --- Single-verse translator card ---------------------------- */
.pq-single-translator-card {
    background: #fff;
    border: 1px solid var(--pq-gray-200, #e5e7eb);
    border-radius: 10px;
    padding: 1rem 1.1rem 1.15rem;
    margin: 1.25rem 0 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pq-translator-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.pq-translator-card-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--pq-gray-900, #0f172a);
}
.pq-translator-name-display {
    font-weight: 600;
}
.pq-translator-profile-link {
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--pq-accent, #2563eb);
    white-space: nowrap;
}
.pq-translator-profile-link:hover {
    text-decoration: underline;
}
.pq-translator-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.pq-translator-switcher label {
    font-size: 0.78rem;
    color: var(--pq-gray-600, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pq-translator-select {
    flex: 1 1 auto;
    min-height: 36px;
    padding: 0.35rem 0.55rem;
    font-size: 0.92rem;
    border: 1px solid var(--pq-gray-300, #d1d5db);
    border-radius: 6px;
    background: #fff;
    color: var(--pq-gray-900, #0f172a);
}
.pq-translator-translation {
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--pq-gray-900, #0f172a);
    margin: 0.25rem 0 0.5rem;
}
.pq-translator-transliteration {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--pq-gray-600, #6b7280);
    font-style: italic;
    margin: 0.25rem 0 0.5rem;
}

/* --- Qur'an Tools section on verse pages --------------------- */
.pq-verse-tools-section {
    margin: 1.5rem 0;
}
.pq-verse-tools-heading {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pq-gray-700, #374151);
    font-weight: 600;
}

/* --- Context-page translator switcher ------------------------ */
.pq-ctx-translator-switcher {
    background: #fff;
    border: 1px solid var(--pq-gray-200, #e5e7eb);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 0 0 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pq-ctx-translator-switcher-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    justify-content: space-between;
}
.pq-ctx-translator-switcher-name {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.pq-ctx-translator-switcher-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pq-gray-600, #6b7280);
}
.pq-ctx-translator-active-name {
    font-size: 1rem;
    color: var(--pq-gray-900, #0f172a);
    font-weight: 600;
}
.pq-ctx-translator-switcher-control {
    flex: 1 1 220px;
    max-width: 360px;
}
.pq-ctx-translator-switcher-control .pq-translator-select {
    width: 100%;
}

/* --- Pre-rendered affiliate stacks (only one visible) -------- */
.pq-verse-affiliate-stack,
.pq-ctx-affiliate-stack {
    margin: 1rem 0 1.25rem;
}
.pq-verse-affiliate-slot {
    /* slot is shown/hidden by JS; inner card carries its own visual styling */
}

/* --- Responsive ---------------------------------------------- */
@media (max-width: 600px) {
    .pq-translator-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .pq-ctx-translator-switcher-row {
        flex-direction: column;
        align-items: stretch;
    }
    .pq-ctx-translator-switcher-control {
        max-width: none;
    }
}

/* ============================================================
 * v2.66.31: Highlight-to-Act selection menu
 * ============================================================ */
.pq-h2a-menu {
    position: absolute;
    z-index: 9999;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    background: var(--pq-gray-900, #0f172a);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.30), 0 2px 6px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    font-family: var(--pq-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.82rem;
    line-height: 1.2;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    animation: pqH2aFade 0.12s ease-out;
}
@keyframes pqH2aFade {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pq-h2a-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    background: transparent;
    color: #fff;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
    transition: background 0.12s ease;
}
.pq-h2a-btn:last-child {
    border-right: 0;
}
.pq-h2a-btn:hover,
.pq-h2a-btn:focus-visible {
    background: rgba(255, 255, 255, 0.10);
    outline: none;
}
.pq-h2a-btn.is-flashed {
    background: rgba(74, 222, 128, 0.20);
}
.pq-h2a-icon {
    font-size: 0.95em;
    line-height: 1;
}
.pq-h2a-label {
    line-height: 1;
}
@media (max-width: 540px) {
    .pq-h2a-menu {
        font-size: 0.75rem;
    }
    .pq-h2a-btn {
        padding: 0.5rem 0.55rem;
    }
    .pq-h2a-label {
        display: none;
    }
    .pq-h2a-icon {
        font-size: 1.1em;
    }
}

/* ============================================================
 * v2.66.31: Compare Translations diff highlighting + tool card
 * ============================================================ */
/* Diff highlighting for the existing .pq-compare-view 3-column layout */
.pq-compare-text .pq-diff-token {
    display: inline;
}
.pq-compare-text .pq-diff-token.is-diff {
    background: rgba(250, 204, 21, 0.30);
    border-bottom: 1px dotted rgba(146, 64, 14, 0.60);
    padding: 0 1px;
    border-radius: 2px;
}
.pq-compare-text .pq-diff-token.is-same {
    /* no styling - same tokens read naturally */
}
.pq-compare-diff-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--pq-gray-700, #374151);
    cursor: pointer;
    user-select: none;
}
.pq-compare-diff-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}
.pq-compare-diff-legend {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--pq-gray-600, #6b7280);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pq-compare-diff-legend .pq-diff-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: rgba(250, 204, 21, 0.30);
    border-bottom: 1px dotted rgba(146, 64, 14, 0.60);
    border-radius: 2px;
}

/* Compare Translations tool card on the verse page */
.pq-compare-link-section .pq-il-link-icon {
    font-style: normal;
}

/* ============================================================
 * v2.66.32: Scoped search component - context overrides
 * ============================================================ */

/* Homepage hero: the section-search component lives inside .hero,
 * which is a dark-green band. Remove the cream background and band
 * styling so it visually matches the original .hero-search card. */
.hero .section-search {
    background: transparent;
    padding: 0;
    border-bottom: 0;
    margin: 0 auto var(--space-2xl);
    max-width: 560px;
}
.hero .section-search-inner {
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 0;
}

/* SERP re-search: the existing .search-again wrapper already gives the
 * section padding; keep the component on a clean white card and trim
 * the band styling so it doesn't double up. */
.search-again .section-search {
    background: transparent;
    padding: 0;
    border-bottom: 0;
}
.search-again .section-search-inner {
    max-width: 720px;
    margin: 0;
}

/* ==========================================================================
   v2.66.51-52: Surah page translator block (affiliate card with profile link inside)
   ========================================================================== */
.pq-surah-translator-block {
    margin: 1rem 0 1.25rem;
}
.pq-surah-translator-block .pq-affiliate-card {
    margin-top: 0;
}
.pq-surah-translator-block .pq-surah-translator-link-wrap {
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
    text-align: center;
}
.pq-surah-translator-block .pq-translator-profile-link {
    color: var(--pq-green, #0a5a3a);
    text-decoration: none;
    font-weight: 600;
}
.pq-surah-translator-block .pq-translator-profile-link:hover,
.pq-surah-translator-block .pq-translator-profile-link:focus {
    text-decoration: underline;
}
/* v2.66.52: profile link injected inside the affiliate card, last line */
.pq-affiliate-translator-link-wrap {
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pq-divider, #e6e1d6);
    font-size: 0.9rem;
    text-align: center;
}
.pq-affiliate-translator-link-wrap .pq-translator-profile-link {
    color: var(--pq-green, #0a5a3a);
    text-decoration: none;
    font-weight: 600;
}
.pq-affiliate-translator-link-wrap .pq-translator-profile-link:hover,
.pq-affiliate-translator-link-wrap .pq-translator-profile-link:focus {
    text-decoration: underline;
}

/* v2.66.53: Reduced "Selected Hadith Collections" promo on New to Islam hadith page */
.pq-hh-section--newtoislam-promo {
    margin: var(--space-xl, 2rem) 0;
}

/* ================================================================
 * v2.66.54: Global .pq-hh-* styles (extracted from mode-everyone.php
 * inline block) so the reduced "Selected Hadith Collections" promo
 * on the New to Islam hadith page renders with the same visual
 * treatment as the full Everyone-mode landing page section.
 * Only the rules used by the promo block (section, table, badge,
 * lang chips) are extracted; rail/tool rules remain local to
 * mode-everyone.php where they are still needed.
 * ================================================================ */
.pq-hh-section { margin-bottom: var(--space-2xl, 3rem); }
.pq-hh-sec-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}
.pq-hh-pip {
    width: 6px;
    height: 22px;
    background: var(--pq-green-dark, #2d6a4f);
    border-radius: 2px;
    display: inline-block;
}
.pq-hh-pip-teal { background: #0d9488; }
.pq-hh-pip-navy { background: #1a365d; }
.pq-hh-h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pq-green-dark, #2d6a4f);
    margin: 0;
    line-height: 1.2;
}
.pq-hh-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--pq-gray-600, #5b6b66);
    background: var(--pq-cream, #f7f5ef);
    border: 1px solid var(--pq-divider, #e2dfd8);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.pq-hh-sec-desc {
    font-size: 0.875rem;
    color: var(--pq-gray-600, #5b6b66);
    line-height: 1.55;
    margin: 0 0 0.75rem 0;
}

/* Tables */
.pq-hh-table-wrap {
    border-radius: var(--radius-lg, 10px);
    overflow: hidden;
    border: 1px solid var(--pq-divider, #e2dfd8);
}
.pq-hh-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.pq-hh-table thead { background: var(--pq-green-dark, #2d6a4f); color: #fff; }
.pq-hh-table th {
    padding: 0.65rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
}
.pq-hh-th-ar { text-align: right; }
.pq-hh-th-count { text-align: center; }

.pq-hh-row { cursor: pointer; transition: background var(--transition-fast, .15s); }
.pq-hh-row:hover { background: var(--pq-green-pale, rgba(45,106,79,0.06)); }
.pq-hh-table td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--pq-divider, #e2dfd8);
    vertical-align: middle;
}
.pq-hh-row:last-child td { border-bottom: none; }

.pq-hh-td-ar {
    font-family: var(--font-arabic, 'Traditional Arabic', serif);
    font-size: 1.15rem;
    color: var(--pq-green-dark, #2d6a4f);
    text-align: right;
    white-space: nowrap;
    width: 1%;
    padding-right: var(--space-lg, 1rem);
}
.pq-hh-td-name { font-weight: 600; color: var(--pq-gray-800, #1e2622); }
.pq-hh-td-name a { color: inherit; text-decoration: none; }
.pq-hh-row:hover .pq-hh-td-name a { color: var(--pq-green-dark, #2d6a4f); }
.pq-hh-td-comp { color: var(--pq-gray-500, #6b7872); font-size: 0.8125rem; }
.pq-hh-td-count { text-align: center; white-space: nowrap; width: 1%; }
.pq-hh-count-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pq-green-dark, #2d6a4f);
    background: var(--pq-green-pale, rgba(45,106,79,0.06));
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
}
.pq-hh-count-badge--alt { background: rgba(13,148,136,0.1); color: #0d9488; }
.pq-hh-count-badge--shia { background: rgba(26,54,93,0.08); color: #1a365d; }

/* Language chips */
.pq-lang-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.02em;
}
.pq-lang-glyph { font-family: var(--font-arabic, 'Traditional Arabic', serif); font-size: 0.95rem; line-height: 1; }
.pq-lang-bilingual {
    background: rgba(45,106,79,0.1);
    color: var(--pq-green-dark, #2d6a4f);
    border: 1px solid rgba(45,106,79,0.25);
}
.pq-lang-arabic-only {
    background: rgba(180,120,20,0.1);
    color: #a86a14;
    border: 1px solid rgba(180,120,20,0.3);
}

/* Responsive (matches mode-everyone.php breakpoints) */
@media (max-width: 768px) {
    .pq-hh-th-comp, .pq-hh-td-comp { display: none; }
    .pq-hh-table th, .pq-hh-table td { padding: 0.6rem 0.5rem; }
    .pq-hh-td-ar { font-size: 1rem; }
}
@media (max-width: 480px) {
    .pq-hh-th-ar, .pq-hh-td-ar { display: none; }
}
