/**
 * HelpTrickBD Pro - Single Article Reading & Student Utilities Stylesheet
 * TOC, Reading Bar, Font Resizer, Focus Mode, MCQ Engine, Code Runner & Print Watermark.
 */

/* -------------------------------------------------------------
 * 0. Single Page 2-Column Grid Layout (Guarantees Sidebar Visibility on >= 840px)
 * ------------------------------------------------------------- */
.ht-single-site .ht-layout-row {
    display: grid !important;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr) !important;
    gap: 30px !important;
    align-items: start !important;
    width: 100% !important;
    margin-bottom: 48px;
}

.ht-single-site .ht-article-col {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ht-single-site .ht-sidebar-area {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

@media (max-width: 1180px) {
    .ht-single-site .ht-layout-row {
        grid-template-columns: minmax(0, 7fr) minmax(0, 3fr) !important;
        gap: 24px !important;
    }
}

@media (max-width: 991px) {
    .ht-single-site .ht-layout-row {
        grid-template-columns: minmax(0, 7fr) minmax(0, 3fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 840px) {
    .ht-single-site .ht-layout-row {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .ht-single-site .ht-sidebar-area {
        width: 100% !important;
    }
}

/* -------------------------------------------------------------
 * 1. Live Reading Progress Bar
 * ------------------------------------------------------------- */
.ht-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: transparent;
    z-index: 99999;
}

.ht-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ht-primary) 0%, var(--ht-accent) 100%);
    transition: width 0.05s ease-out;
}

/* -------------------------------------------------------------
 * 2. Breadcrumbs
 * ------------------------------------------------------------- */
.ht-breadcrumbs {
    margin: 18px 0 24px 0;
    font-size: 0.85rem;
    color: var(--ht-text-muted);
}

.ht-breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.ht-breadcrumbs a {
    color: var(--ht-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ht-breadcrumbs a:hover {
    color: var(--ht-primary);
}

.ht-crumb-sep-item {
    display: inline-flex;
    align-items: center;
    color: var(--ht-text-muted);
    opacity: 0.6;
}

.ht-crumb-current {
    color: var(--ht-text-muted);
    font-weight: 500;
}

/* -------------------------------------------------------------
 * 3. Article Header & Meta
 * ------------------------------------------------------------- */
.ht-article-col {
    background: var(--ht-surface-card);
    border: 1px solid var(--ht-surface-border);
    border-radius: 18px;
    padding: 44px 48px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
}

[data-theme="dark"] .ht-article-col {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.ht-header-top-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.ht-article-title {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.42;
    color: var(--ht-text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.015em;
    font-family: var(--ht-font-bn) !important;
}

.ht-article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--ht-surface-border);
    border-bottom: 1px solid var(--ht-surface-border);
    margin-bottom: 16px;
}

.ht-meta-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ht-author-avatar-sm {
    border-radius: var(--ht-radius-full);
}

.ht-author-text {
    font-size: 0.9rem;
}

.ht-author-by {
    color: var(--ht-text-muted);
}

.ht-author-link {
    font-weight: 700;
    color: var(--ht-text-primary);
}

.ht-author-link:hover {
    color: var(--ht-primary);
}

.ht-meta-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--ht-text-muted);
}

.ht-updated-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ht-surface-hover);
    border: 1px solid var(--ht-surface-border);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--ht-radius-full);
    color: var(--ht-text-muted);
    margin-bottom: 20px;
}

/* -------------------------------------------------------------
 * 4. Student Reading Toolbelt
 * ------------------------------------------------------------- */
.ht-reading-toolbelt {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--ht-surface-hover);
    border: 1px solid var(--ht-surface-border);
    padding: 10px 16px;
    border-radius: var(--ht-radius-md);
    margin-bottom: 26px;
}

.ht-toolbelt-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ht-tool-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ht-text-muted);
}

.ht-resizer-btn {
    padding: 3px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--ht-radius-sm);
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    color: var(--ht-text-secondary);
}

.ht-resizer-btn:hover, .ht-resizer-btn.ht-active {
    background: var(--ht-primary);
    color: #fff;
    border-color: var(--ht-primary);
}

.ht-toolbelt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--ht-radius-sm);
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    color: var(--ht-text-secondary);
    transition: var(--ht-transition);
}

.ht-toolbelt-btn:hover, .ht-toolbelt-btn.ht-active {
    background: var(--ht-primary-light);
    color: var(--ht-primary);
    border-color: var(--ht-primary);
}

/* -------------------------------------------------------------
 * 4. Dynamic Font Resizing System (A-, A, A+)
 * High-specificity rules guaranteeing immediate live font size changes!
 * ------------------------------------------------------------- */
body.ht-font-sm .ht-entry-content,
body.ht-font-sm .ht-entry-content p,
body.ht-font-sm .ht-entry-content li,
body.ht-font-sm .ht-entry-content td,
body.ht-font-sm .ht-entry-content th,
body.ht-font-sm .ht-entry-content blockquote {
    font-size: 0.98rem !important;
    line-height: 1.75 !important;
}

body.ht-font-lg .ht-entry-content,
body.ht-font-lg .ht-entry-content p,
body.ht-font-lg .ht-entry-content li,
body.ht-font-lg .ht-entry-content td,
body.ht-font-lg .ht-entry-content th,
body.ht-font-lg .ht-entry-content blockquote {
    font-size: 1.30rem !important;
    line-height: 2.15 !important;
}

/* -------------------------------------------------------------
 * 5. Auto Table of Contents (সূচিপত্র) - Desktop vs Mobile Specialized Architecture
 * ------------------------------------------------------------- */
.ht-toc-container {
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-left: 4px solid var(--ht-primary);
    border-radius: var(--ht-radius-md);
    margin: 24px 0 32px 0;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    /* v1.4.10 (F6): stay visible while reading a long article. */
    position: sticky;
    top: 90px;
    z-index: 5;
}

.ht-toc-container:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.ht-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    background: var(--ht-surface-hover);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease;
}

.ht-toc-header:hover {
    background: var(--ht-primary-light);
}

.ht-toc-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ht-text-primary);
    flex-wrap: wrap;
}

.ht-toc-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--ht-primary-light);
    color: var(--ht-primary);
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 9999px;
    border: 1px solid var(--ht-primary-border);
}

.ht-toc-toggle {
    color: var(--ht-text-muted);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ht-toc-container.ht-collapsed .ht-toc-toggle {
    transform: rotate(-90deg);
}

.ht-toc-container.ht-collapsed .ht-toc-nav {
    display: none !important;
}

.ht-toc-nav {
    padding: 16px 20px 20px 24px;
    background: var(--ht-surface);
    /* v1.4.10 (F6): cap the height on desktop so a long TOC no longer
       pushes the featured image below the fold; it scrolls internally. */
    max-height: 420px;
    overflow-y: auto;
}

.ht-toc-list {
    list-style: decimal;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0;
}

.ht-toc-list a {
    font-size: 0.95rem;
    color: var(--ht-text-secondary);
    font-weight: 500;
    line-height: 1.5;
    transition: color 0.2s ease, transform 0.15s ease;
    display: inline-block;
}

.ht-toc-list a:hover, .ht-toc-list a.ht-toc-active {
    color: var(--ht-primary);
    font-weight: 700;
    transform: translateX(2px);
}

.ht-toc-sub-list {
    list-style: circle;
    padding-left: 18px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* =============================================================
 * Mobile Specific Table of Contents (Dedicated Lightweight Drawer)
 * ============================================================= */
@media (max-width: 767px) {
    .ht-toc-container {
        margin: 18px 0 26px 0;
        border-radius: 14px;
        border-left-width: 3.5px;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
        /* v1.4.10 (F6): no sticky TOC on mobile (it auto-collapses). */
        position: static;
    }

    .ht-toc-header {
        padding: 13px 15px;
    }

    .ht-toc-title {
        font-size: 0.96rem;
    }

    .ht-toc-count-badge {
        font-size: 0.72rem;
        padding: 1px 7px;
    }

    /* Mobile Drawer: Scrollable when opened with smooth max-height */
    .ht-toc-container:not(.ht-collapsed) .ht-toc-nav {
        max-height: 380px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 16px 18px 20px;
    }

    .ht-toc-list a {
        font-size: 0.92rem;
        padding: 3px 0;
    }
}

/* Hide duplicate Gutenberg Rank Math TOC block inside article body */
.ht-entry-content #rank-math-toc,
.ht-entry-content .wp-block-rank-math-toc-block {
    display: none !important;
}

/* -------------------------------------------------------------
 * 6. Article Body Typography & Gutenberg Blocks
 * ------------------------------------------------------------- */
.ht-entry-content {
    /* v1.4.10 (F13): 17px/1.8 — the old 17.9px/1.95 was very loose. */
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ht-text-primary);
    font-family: var(--ht-font-bn) !important;
    word-break: break-word;
}

.ht-entry-content,
.ht-entry-content *,
.ht-entry-content p,
.ht-entry-content span,
.ht-entry-content li,
.ht-entry-content h1,
.ht-entry-content h2,
.ht-entry-content h3,
.ht-entry-content h4,
.ht-entry-content h5,
.ht-entry-content h6,
.ht-entry-content table,
.ht-entry-content th,
.ht-entry-content td,
.ht-entry-content caption,
.ht-entry-content blockquote {
    font-family: var(--ht-font-bn) !important;
}

.ht-entry-content code,
.ht-entry-content pre,
.ht-entry-content kbd {
    font-family: var(--ht-font-code) !important;
}

.ht-entry-content p {
    margin-bottom: 22px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ht-text-primary);
}

/* First lead paragraph with elegant prominence */
.ht-entry-content > p:first-of-type {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--ht-text-secondary);
    font-weight: 500;
}

/* =============================================================
 * In-Content & Internal Link Styling (Ultra-High Visibility)
 * ============================================================= */
.ht-entry-content a {
    color: #1d4ed8 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(29, 78, 216, 0.45) !important;
    text-decoration-thickness: 1.8px !important;
    text-underline-offset: 4px !important;
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline;
}

.ht-entry-content a:hover,
.ht-entry-content a:focus {
    color: #1e3a8a !important;
    text-decoration-color: #1d4ed8 !important;
    text-decoration-thickness: 2.2px !important;
    background-color: #eff6ff !important;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.12) !important;
}

.ht-entry-content a:active {
    background-color: #dbeafe !important;
}

/* Dark Mode In-Content & Internal Links */
[data-theme="dark"] .ht-entry-content a {
    color: #60a5fa !important;
    text-decoration-color: rgba(96, 165, 250, 0.45) !important;
}

[data-theme="dark"] .ht-entry-content a:hover,
[data-theme="dark"] .ht-entry-content a:focus {
    color: #93c5fd !important;
    text-decoration-color: #60a5fa !important;
    background-color: rgba(37, 99, 235, 0.22) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .ht-entry-content a:active {
    background-color: rgba(37, 99, 235, 0.35) !important;
}

/* Buttons / Header anchors exemption */
.ht-entry-content .ht-btn,
.ht-entry-content a.button,
.ht-entry-content a.wp-block-button__link {
    text-decoration: none !important;
    padding: 12px 24px !important;
    margin: 0 !important;
}

.ht-entry-content h1 a,
.ht-entry-content h2 a,
.ht-entry-content h3 a,
.ht-entry-content h4 a {
    text-decoration: none !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ht-entry-content h1 a:hover,
.ht-entry-content h2 a:hover,
.ht-entry-content h3 a:hover,
.ht-entry-content h4 a:hover {
    color: var(--ht-primary) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Headings with Signature Brand Accent Lines */
.ht-entry-content h2 {
    font-size: 1.68rem;
    font-weight: 800;
    line-height: 1.42;
    margin: 44px 0 20px 0;
    padding: 2px 0 2px 16px;
    border-left: 5px solid #2563eb;
    border-bottom: none;
    color: var(--ht-text-primary);
    letter-spacing: -0.01em;
}

[data-theme="dark"] .ht-entry-content h2 {
    border-left-color: #3b82f6;
    color: #f8fafc;
}

.ht-entry-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 32px 0 16px 0;
    padding-left: 16px;
    position: relative;
    color: var(--ht-text-primary);
}

.ht-entry-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 18px;
    background: #3b82f6;
    border-radius: 2px;
}

[data-theme="dark"] .ht-entry-content h3::before {
    background: #60a5fa;
}

.ht-entry-content h4 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 24px 0 12px 0;
    color: var(--ht-text-secondary);
}

.ht-entry-content ul, .ht-entry-content ol {
    margin: 0 0 24px 28px;
}

.ht-entry-content li {
    margin-bottom: 10px;
    line-height: 1.88;
    color: var(--ht-text-primary);
}

/* Blockquotes with Soft Accent Tint */
.ht-entry-content blockquote {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-left: 5px solid #2563eb;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
    font-style: normal;
    color: #1e3a8a;
    font-size: 1.08rem;
    line-height: 1.88;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

[data-theme="dark"] .ht-entry-content blockquote {
    background: rgba(30, 41, 59, 0.75) !important;
    border-left-color: #3b82f6 !important;
    color: #93c5fd !important;
    box-shadow: none !important;
}

.ht-entry-content img {
    border-radius: var(--ht-radius-md);
    margin: 24px auto;
    max-width: 100% !important;
    height: auto !important;
}

.ht-entry-content figure {
    margin: 24px 0;
    text-align: center;
}

.ht-entry-content figcaption {
    font-size: 0.85rem;
    color: var(--ht-text-muted);
    margin-top: 8px;
}

/* Responsive Table Wrapper */
.ht-table-responsive,
.ht-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border-radius: var(--ht-radius-md);
    border: 1px solid var(--ht-surface-border);
    background: var(--ht-surface);
    box-shadow: var(--ht-shadow-sm);
    width: 100%;
    max-width: 100%;
}

.ht-table-scroll-hint {
    /* v1.4.10 (F12): hidden by default — JS adds .ht-table-overflows to the
       wrapper only when the table is genuinely wider than its container. */
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ht-primary);
    padding: 8px 14px;
    background: var(--ht-primary-light);
    border-bottom: 1px solid var(--ht-primary-border);
}

.ht-table-responsive.ht-table-overflows .ht-table-scroll-hint,
.ht-table-wrapper.ht-table-overflows .ht-table-scroll-hint {
    display: flex;
}

.ht-entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1rem;
    min-width: 480px;
    border: 1px solid var(--ht-surface-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 28px 0;
}

.ht-entry-content th, .ht-entry-content td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--ht-surface-border);
    border-right: 1px solid var(--ht-surface-border);
    text-align: left;
    font-family: var(--ht-font-bn) !important;
    /* v1.4.11: never break a word mid-way in a table cell. The parent
       .ht-entry-content sets word-break: break-word, which split e.g.
       "Question 01" into "Questio n 01" in narrow columns. Tables have
       min-width + a scroll wrapper, so cells have room to wrap on spaces. */
    word-break: normal;
    overflow-wrap: normal;
}

.ht-entry-content th:last-child,
.ht-entry-content td:last-child {
    border-right: none;
}

.ht-entry-content tr:last-child td {
    border-bottom: none;
}

.ht-entry-content th {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--ht-text-primary);
    border-bottom: 2px solid #cbd5e1;
}

.ht-entry-content tr:nth-child(even) td {
    background: #f8fafc;
}

.ht-entry-content tr:hover td {
    background: #eff6ff;
}

[data-theme="dark"] .ht-entry-content th {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .ht-entry-content tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .ht-entry-content tr:hover td {
    background: rgba(37, 99, 235, 0.12);
}

/* -------------------------------------------------------------
 * 7. Academic Alert / Notice Boxes
 * ------------------------------------------------------------- */
.ht-alert-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--ht-radius-md);
    margin: 24px 0;
    border: 1px solid transparent;
}

.ht-alert-info {
    background: var(--ht-info-light);
    border-color: rgba(2, 132, 199, 0.3);
    color: #0369a1;
}

.ht-alert-warning {
    background: var(--ht-warning-light);
    border-color: rgba(245, 158, 11, 0.3);
    color: #b45309;
}

.ht-alert-routine {
    background: var(--ht-primary-light);
    border-color: var(--ht-primary-border);
    color: var(--ht-primary);
}

/* -------------------------------------------------------------
 * 8. Interactive MCQ / Quiz Reveal Accordion
 * ------------------------------------------------------------- */
.ht-mcq-card {
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-md);
    padding: 20px;
    margin: 24px 0;
    box-shadow: var(--ht-shadow-sm);
}

.ht-mcq-question {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--ht-text-primary);
}

.ht-mcq-options {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.ht-mcq-option {
    padding: 8px 14px;
    background: var(--ht-surface-hover);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-sm);
    cursor: pointer;
    transition: var(--ht-transition);
}

.ht-mcq-option:hover {
    border-color: var(--ht-primary);
}

.ht-mcq-reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ht-surface-hover);
    border: 1px solid var(--ht-surface-border);
    color: var(--ht-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--ht-radius-sm);
}

.ht-mcq-answer {
    display: none;
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--ht-accent-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--ht-radius-sm);
    color: #065f46;
}

.ht-mcq-answer.ht-open {
    display: block;
}

/* -------------------------------------------------------------
 * 9. Subject Syllabus & Study Checklist
 * ------------------------------------------------------------- */
.ht-checklist-box {
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-md);
    padding: 20px;
    margin: 24px 0;
}

.ht-checklist-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.ht-checklist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ht-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.ht-checklist-item.ht-checked {
    text-decoration: line-through;
    color: var(--ht-text-muted);
}

/* -------------------------------------------------------------
 * 10. Keyword Glossary Tooltips (.ht-term)
 * ------------------------------------------------------------- */
.ht-term {
    border-bottom: 1.5px dashed var(--ht-primary);
    cursor: help;
    position: relative;
    color: var(--ht-primary);
    font-weight: 600;
}

.ht-term-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: var(--ht-radius-sm);
    white-space: normal;
    width: 220px;
    box-shadow: var(--ht-shadow-md);
    display: none;
    z-index: 100;
    text-align: center;
}

.ht-term:hover .ht-term-tooltip {
    display: block;
}

/* -------------------------------------------------------------
 * 11. ICT Live Code Runner Tab
 * ------------------------------------------------------------- */
.ht-code-runner {
    background: #090d16;
    border: 1px solid #1e293b;
    border-radius: var(--ht-radius-md);
    margin: 24px 0;
    overflow: hidden;
}

.ht-runner-tabs {
    display: flex;
    align-items: center;
    background: #111827;
    border-bottom: 1px solid #1e293b;
}

.ht-runner-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border-right: 1px solid #1e293b;
}

.ht-runner-tab-btn.ht-active {
    background: #090d16;
    color: var(--ht-accent);
}

.ht-runner-copy-btn {
    margin-left: auto;
    padding: 8px 14px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}

.ht-runner-pane {
    display: none;
    padding: 16px;
}

.ht-runner-pane.ht-active {
    display: block;
}

.ht-runner-preview-frame {
    width: 100%;
    min-height: 200px;
    background: #fff;
    border: none;
    border-radius: var(--ht-radius-sm);
}

/* -------------------------------------------------------------
 * 12. Animated PDF Download Button with Timer
 * ------------------------------------------------------------- */
.ht-download-box {
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-md);
    padding: 24px;
    text-align: center;
    margin: 32px 0;
}

.ht-download-timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ht-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--ht-radius-md);
    box-shadow: var(--ht-shadow-md);
    transition: var(--ht-transition);
}

.ht-download-timer-btn:hover {
    background: var(--ht-primary-hover);
    transform: translateY(-2px);
}

/* HelpTrickBD Compact PDF & Navigation Buttons */
.htbd-pdf-section {
    background: var(--ht-surface-card);
    border: 1.5px solid var(--ht-surface-border);
    border-top: 4px solid var(--ht-danger);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 30px 0 25px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    color: var(--ht-text-primary);
    box-sizing: border-box;
}

.htbd-pdf-title {
    color: var(--ht-text-primary);
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
    border: none;
    padding: 0;
}

.htbd-pdf-desc {
    color: var(--ht-text-secondary);
    font-size: 14.5px;
    line-height: 1.75;
    margin: 10px 0 16px 0;
}

.ht-entry-content a.htbd-pdf-btn,
.htbd-pdf-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: var(--ht-primary) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 10px 22px !important;
    border-radius: 9px !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.28) !important;
    transition: all 0.2s ease !important;
}

.ht-entry-content a.htbd-pdf-btn:hover,
.ht-entry-content a.htbd-pdf-btn:focus,
.htbd-pdf-btn:hover,
.htbd-pdf-btn:focus {
    background: var(--ht-primary-hover) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4) !important;
}

.ht-entry-content a.htbd-year-link-btn,
.htbd-year-link-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #0284c7 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.22) !important;
    transition: all 0.2s ease !important;
    margin-top: 8px !important;
}

.ht-entry-content a.htbd-year-link-btn:hover,
.ht-entry-content a.htbd-year-link-btn:focus,
.htbd-year-link-btn:hover,
.htbd-year-link-btn:focus {
    background: #0369a1 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
}

/* Dark Mode Overrides */
[data-theme="dark"] .htbd-pdf-section {
    background: #1e293b !important;
    border-color: #334155 !important;
    border-top-color: #ef4444 !important;
    color: #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .htbd-pdf-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .htbd-pdf-desc {
    color: #94a3b8 !important;
}

[data-theme="dark"] .ht-entry-content a.htbd-year-link-btn,
[data-theme="dark"] .htbd-year-link-btn {
    background: #0284c7 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .ht-entry-content a.htbd-year-link-btn:hover,
[data-theme="dark"] .htbd-year-link-btn:hover {
    background: #0369a1 !important;
    color: #ffffff !important;
}

/* -------------------------------------------------------------
 * 13. Single Community & Helpful Widgets
 * ------------------------------------------------------------- */
/* Community Card */
.ht-single-community-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, var(--ht-surface-hover) 0%, var(--ht-primary-light) 100%);
    border: 1px solid var(--ht-primary-border);
    padding: 22px;
    border-radius: var(--ht-radius-md);
    margin: 32px 0;
}

.ht-community-icon-box {
    color: var(--ht-primary);
}

.ht-community-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ht-community-desc {
    font-size: 0.88rem;
    color: var(--ht-text-muted);
}

.ht-community-links {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* Tags List */
.ht-tags-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0;
}

.ht-tags-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ht-text-muted);
}

.ht-tag-chip {
    padding: 4px 12px;
    background: var(--ht-surface-hover);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-full);
    font-size: 0.82rem;
    color: var(--ht-text-secondary);
}

.ht-tag-chip:hover {
    background: var(--ht-primary);
    color: #fff;
    border-color: var(--ht-primary);
}

/* Author Card completely removed as per specification */

/* Related Posts */
.ht-related-section {
    margin: 40px 0;
    padding-top: 24px;
    border-top: 2px solid var(--ht-surface-border);
}

.ht-related-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.ht-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.ht-related-card {
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-md);
    overflow: hidden;
}

.ht-related-thumb-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.ht-related-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ht-related-body {
    padding: 12px;
}

.ht-related-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.38;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ht-related-date {
    font-size: 0.75rem;
    color: var(--ht-text-muted);
}

/* -------------------------------------------------------------
 * 14. Focus Reading Mode
 * ------------------------------------------------------------- */
body.ht-focus-mode .ht-sidebar-area,
body.ht-focus-mode .ht-topbar,
body.ht-focus-mode .ht-footer,
body.ht-focus-mode .ht-ad-wrapper,
body.ht-focus-mode .ht-single-community-card {
    display: none !important;
}

body.ht-focus-mode .ht-layout-row {
    grid-template-columns: 1fr;
    max-width: 820px;
    margin: 0 auto;
}

body.ht-focus-mode .ht-article-col {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 10px 0;
}

/* -------------------------------------------------------------
 * 15. Comments Styling
 * ------------------------------------------------------------- */
.ht-comments-area {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--ht-surface-border);
}

.ht-comments-header {
    margin-bottom: 24px;
}

.ht-comments-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 800;
}

.ht-comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.comment {
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    padding: 18px;
    border-radius: var(--ht-radius-md);
}

.comment .children {
    list-style: none;
    margin-top: 16px;
    padding-left: 24px;
    border-left: 2px solid var(--ht-surface-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author img {
    border-radius: var(--ht-radius-full);
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--ht-text-muted);
    margin-bottom: 10px;
}

.comment-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.reply a {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ht-primary);
}

.comment-respond {
    background: var(--ht-surface-hover);
    border: 1px solid var(--ht-surface-border);
    padding: 24px;
    border-radius: var(--ht-radius-md);
}

.comment-reply-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.comment-form p {
    margin-bottom: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-sm);
    color: var(--ht-text-primary);
}

.comment-form textarea {
    min-height: 120px;
}

/* -------------------------------------------------------------
 * 16. Print Stylesheet with Watermark
 * ------------------------------------------------------------- */
.ht-print-watermark {
    display: none;
}

@media print {
    .ht-header, .ht-topbar, .ht-footer, .ht-sidebar-area,
    .ht-reading-toolbelt, .ht-toc-container, .ht-reading-progress,
    .ht-ad-wrapper, .ht-single-community-card, .ht-comments-area,
    .ht-scroll-top, .ht-mobile-dock, .ht-related-section {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt !important;
    }

    .ht-article-col {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .ht-print-watermark {
        display: block !important;
        text-align: center;
        padding-bottom: 16px;
        margin-bottom: 24px;
        border-bottom: 2px solid #000;
    }

    .ht-print-logo {
        font-size: 20pt;
        font-weight: 800;
    }

    .ht-print-subtitle {
        font-size: 9pt;
        color: #444;
    }
}

/* Responsive Single Article */
@media (max-width: 768px) {
    .ht-article-col {
        padding: 20px 16px;
    }
    .ht-article-title {
        font-size: 1.45rem;
        line-height: 1.35;
    }
    .ht-entry-content h2 {
        font-size: 1.30rem;
        line-height: 1.4;
        margin: 32px 0 16px 0;
        padding-left: 12px;
    }
    .ht-entry-content h3 {
        font-size: 1.18rem;
        line-height: 1.42;
        margin: 24px 0 12px 0;
        padding-left: 12px;
    }
    .ht-entry-content h4 {
        font-size: 1.05rem;
    }
    .ht-related-grid {
        grid-template-columns: 1fr;
    }
    .ht-single-community-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px 14px !important;
        gap: 14px !important;
    }
    .ht-community-links {
        margin-left: 0 !important;
        width: 100% !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .ht-community-links .ht-btn {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center !important;
        border-radius: var(--ht-radius-md) !important;
    }
    .ht-table-responsive.ht-table-overflows .ht-table-scroll-hint,
    .ht-table-wrapper.ht-table-overflows .ht-table-scroll-hint {
        display: flex;
    }
}

@media (max-width: 480px) {
    .ht-article-col {
        padding: 16px 12px;
        border-radius: var(--ht-radius-sm);
    }
    .ht-article-title {
        font-size: 1.32rem;
        line-height: 1.35;
        margin-bottom: 14px;
    }
    .ht-entry-content h2 {
        font-size: 1.20rem;
        line-height: 1.38;
        margin: 26px 0 12px 0;
        padding-left: 10px;
        border-left-width: 4px;
    }
    .ht-entry-content h3 {
        font-size: 1.10rem;
        line-height: 1.4;
        margin: 20px 0 10px 0;
        padding-left: 10px;
    }
    .ht-entry-content h4 {
        font-size: 0.98rem;
    }
    .ht-entry-content p {
        font-size: 1.05rem;
        line-height: 1.88;
        margin-bottom: 18px;
    }
    .ht-reading-toolbelt {
        gap: 6px;
        padding: 8px;
    }
    .ht-resizer-btn {
        padding: 2px 8px;
        font-size: 0.8rem;
    }
    .ht-toolbelt-btn {
        padding: 4px 8px;
        font-size: 0.78rem;
    }
    .ht-tool-label {
        font-size: 0.78rem;
    }
    .ht-meta-stats {
        gap: 8px;
        font-size: 0.75rem;
    }
}

/* Mobile Compact Icon-Based Reading Toolbelt Grid */
@media (max-width: 600px) {
    .ht-reading-toolbelt {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        overflow: visible !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .ht-reading-toolbelt::-webkit-scrollbar {
        display: none !important;
    }
    .ht-toolbelt-group.ht-font-resizer {
        grid-column: span 3 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 6px 10px !important;
        background: var(--ht-surface) !important;
        border: 1px solid var(--ht-surface-border) !important;
        border-radius: var(--ht-radius-sm, 6px) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .ht-tool-label {
        font-size: 0.8rem !important;
        margin-right: 4px !important;
        white-space: nowrap !important;
    }
    .ht-resizer-btn {
        flex: 1 !important;
        max-width: 52px !important;
        padding: 5px 0 !important;
        text-align: center !important;
        font-size: 0.82rem !important;
        border-radius: 4px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .ht-toolbelt-btn {
        grid-column: span 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 8px 4px !important;
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        min-height: 48px !important;
        white-space: nowrap !important;
        border-radius: var(--ht-radius-sm, 6px) !important;
        background: var(--ht-surface) !important;
        border: 1px solid var(--ht-surface-border) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .ht-toolbelt-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    .ht-toolbelt-btn .ht-btn-label {
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 380px) {
    .ht-toolbelt-btn {
        padding: 6px 2px !important;
        font-size: 0.68rem !important;
    }
    .ht-toolbelt-btn .ht-btn-label {
        font-size: 0.68rem !important;
    }
    .ht-resizer-btn {
        max-width: 44px !important;
        font-size: 0.78rem !important;
    }
}

/* =============================================================
   Single Post Dark Mode Contrast & Content Perfection
   ============================================================= */
[data-theme="dark"] .ht-article-col {
    background: #131b2e !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-article-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-author-link {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .ht-meta-stats,
[data-theme="dark"] .ht-author-by {
    color: #94a3b8 !important;
}

[data-theme="dark"] .ht-article-meta-row {
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-updated-badge {
    background: #111827 !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
}

/* Toolbelt */
[data-theme="dark"] .ht-reading-toolbelt {
    background: #111827 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-tool-label {
    color: #94a3b8 !important;
}

[data-theme="dark"] .ht-resizer-btn,
[data-theme="dark"] .ht-toolbelt-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-resizer-btn:hover,
[data-theme="dark"] .ht-resizer-btn.ht-active,
[data-theme="dark"] .ht-toolbelt-btn:hover,
[data-theme="dark"] .ht-toolbelt-btn.ht-active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

/* Table of Contents (TOC) */
[data-theme="dark"] .ht-toc-container {
    background: #111827 !important;
    border-color: #1e293b !important;
    border-left-color: #3b82f6 !important;
}

[data-theme="dark"] .ht-toc-header {
    background: #1a2234 !important;
}

[data-theme="dark"] .ht-toc-title-wrap {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-toc-list a {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-toc-list a:hover,
[data-theme="dark"] .ht-toc-list a.ht-toc-active {
    color: #60a5fa !important;
}

/* Article Entry Content Typography in Dark Mode (WCAG 2.1 AA Compliant) */
[data-theme="dark"] .ht-entry-content {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .ht-entry-content h1,
[data-theme="dark"] .ht-entry-content h2,
[data-theme="dark"] .ht-entry-content h3,
[data-theme="dark"] .ht-entry-content h4,
[data-theme="dark"] .ht-entry-content h5,
[data-theme="dark"] .ht-entry-content h6,
[data-theme="dark"] .ht-entry-content h1 *,
[data-theme="dark"] .ht-entry-content h2 *,
[data-theme="dark"] .ht-entry-content h3 *,
[data-theme="dark"] .ht-entry-content h4 *,
[data-theme="dark"] .ht-entry-content h5 *,
[data-theme="dark"] .ht-entry-content h6 * {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-entry-content h2 {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .ht-entry-content p,
[data-theme="dark"] .ht-entry-content li {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-entry-content figcaption,
[data-theme="dark"] .ht-entry-content figcaption * {
    color: #94a3b8 !important;
}

[data-theme="dark"] .ht-entry-content strong,
[data-theme="dark"] .ht-entry-content b {
    color: #ffffff !important;
}

[data-theme="dark"] .ht-entry-content a {
    color: #60a5fa !important;
    text-decoration-color: rgba(96, 165, 250, 0.45) !important;
}

[data-theme="dark"] .ht-entry-content a:hover {
    color: #93c5fd !important;
    text-decoration-color: #60a5fa !important;
    background-color: rgba(37, 99, 235, 0.22) !important;
}

/* Callout Boxes, Quick Summaries (সারসংক্ষেপ) & Blockquotes in Dark Mode */
[data-theme="dark"] .ht-entry-content blockquote,
[data-theme="dark"] .ht-entry-content .ht-migrated-callout,
[data-theme="dark"] .ht-entry-content div[style*="background"] {
    background: rgba(30, 41, 59, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
}

[data-theme="dark"] .ht-entry-content div[style*="background"] strong,
[data-theme="dark"] .ht-entry-content div[style*="background"] b,
[data-theme="dark"] .ht-entry-content div[style*="background"] h3,
[data-theme="dark"] .ht-entry-content div[style*="background"] h4 {
    color: #f8fafc !important;
}

/* Question bank / Creative Questions (সৃজনশীল ও বহুনির্বাচনী প্রশ্ন) in Dark Mode */
[data-theme="dark"] .ht-entry-content h3 span[style*="color: rgb(20"],
[data-theme="dark"] .ht-entry-content h3 span[style*="color: rgb(21"],
[data-theme="dark"] .ht-entry-content h3 span[style*="color: #14532d"],
[data-theme="dark"] .ht-entry-content h3 span[style*="color: #15803d"] {
    color: #4ade80 !important;
}

[data-theme="dark"] .ht-entry-content h3 span[style*="color: #0369a1"],
[data-theme="dark"] .ht-entry-content h3 span[style*="color: #1a73e8"],
[data-theme="dark"] .ht-entry-content h3 span[style*="color: #0c2340"] {
    color: #38bdf8 !important;
}

/* Universal Inline Contrast Fallback */
[data-theme="dark"] .ht-entry-content span[style*="color: #1"],
[data-theme="dark"] .ht-entry-content span[style*="color: #2"],
[data-theme="dark"] .ht-entry-content span[style*="color: #3"],
[data-theme="dark"] .ht-entry-content span[style*="color: #0"],
[data-theme="dark"] .ht-entry-content p[style*="color: #1"],
[data-theme="dark"] .ht-entry-content p[style*="color: #2"],
[data-theme="dark"] .ht-entry-content p[style*="color: #3"],
[data-theme="dark"] .ht-entry-content p[style*="color: #0"] {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-entry-content code,
[data-theme="dark"] .ht-entry-content kbd {
    background: #090d16 !important;
    color: #38bdf8 !important;
    border: 1px solid #1e293b !important;
}

/* Responsive Tables */
[data-theme="dark"] .ht-table-responsive,
[data-theme="dark"] .ht-table-wrapper {
    background: #111827 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-table-scroll-hint {
    background: rgba(37, 99, 235, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .ht-entry-content table {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(15, 23, 42, 0.6) !important;
}

[data-theme="dark"] .ht-entry-content th {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .ht-entry-content td {
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .ht-entry-content td * {
    color: inherit !important;
}

[data-theme="dark"] .ht-entry-content tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Alert Boxes */
[data-theme="dark"] .ht-alert-info {
    background: rgba(2, 132, 199, 0.15) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
}

[data-theme="dark"] .ht-alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .ht-alert-routine {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #60a5fa !important;
}

/* MCQ Interactive Engine */
[data-theme="dark"] .ht-mcq-card {
    background: #111827 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-mcq-question {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-mcq-option {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-mcq-reveal-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .ht-mcq-answer {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(52, 211, 153, 0.35) !important;
    color: #34d399 !important;
}

/* Checklist */
[data-theme="dark"] .ht-checklist-box {
    background: #111827 !important;
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-checklist-title {
    color: #f8fafc !important;
}

/* Download Box */
[data-theme="dark"] .ht-download-box {
    background: #111827 !important;
    border-color: #1e293b !important;
}



/* Community Study Group Card */
[data-theme="dark"] .ht-single-community-card {
    background: linear-gradient(135deg, #111827 0%, rgba(37, 99, 235, 0.15) 100%) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

[data-theme="dark"] .ht-community-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-community-desc {
    color: #94a3b8 !important;
}

/* Tags List */
[data-theme="dark"] .ht-tag-chip {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* Breadcrumbs */
[data-theme="dark"] .ht-breadcrumbs a {
    color: #94a3b8 !important;
}

[data-theme="dark"] .ht-crumb-current {
    color: #cbd5e1 !important;
}

/* Related Posts */
[data-theme="dark"] .ht-related-card {
    background: #111827 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-related-title a {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-related-title a:hover {
    color: #60a5fa !important;
}

[data-theme="dark"] .ht-related-meta {
    color: #94a3b8 !important;
}

/* -------------------------------------------------------------
 * 16. Social Share Bars (Top & Bottom)
 * ------------------------------------------------------------- */
.ht-share-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 20px 0;
    padding: 10px 16px;
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: var(--ht-radius-full);
}

.ht-share-top .ht-share-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ht-text-muted);
}

.ht-share-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ht-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--ht-radius-full);
    background: var(--ht-surface-hover);
    color: var(--ht-text-secondary);
    border: 1px solid var(--ht-surface-border);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
}

.ht-share-btn:hover {
    transform: translateY(-2px) scale(1.08);
}

.ht-share-fb:hover { background: #1877f2 !important; color: #fff !important; border-color: #1877f2 !important; }
.ht-share-wa:hover { background: #25d366 !important; color: #fff !important; border-color: #25d366 !important; }
.ht-share-tg:hover { background: #229ed9 !important; color: #fff !important; border-color: #229ed9 !important; }
.ht-share-tw:hover { background: #0f1419 !important; color: #fff !important; border-color: #0f1419 !important; }
.ht-share-li:hover { background: #0a66c2 !important; color: #fff !important; border-color: #0a66c2 !important; }
.ht-share-copy:hover { background: var(--ht-primary) !important; color: #fff !important; border-color: var(--ht-primary) !important; }

/* Bottom Large Share Card */
.ht-share-bottom {
    margin: 36px 0 24px 0;
    padding: 24px 28px;
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.ht-share-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.ht-share-card-header .ht-share-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ht-primary-light);
    color: var(--ht-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ht-share-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ht-text-primary);
    margin-bottom: 4px;
}

.ht-share-card-sub {
    font-size: 0.88rem;
    color: var(--ht-text-muted);
    margin: 0;
}

.ht-share-card-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ht-share-large-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--ht-radius-full);
    border: 1px solid var(--ht-surface-border);
    background: var(--ht-surface-hover);
    color: var(--ht-text-primary);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ht-share-large-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* -------------------------------------------------------------
 * 17. Interactive Student Helpful Reaction Box
 * ------------------------------------------------------------- */
.ht-reaction-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    margin: 24px 0 32px 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 16px;
}

.ht-reaction-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ht-reaction-question {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ht-text-primary);
}

.ht-reaction-sub {
    font-size: 0.85rem;
    color: var(--ht-text-muted);
}

.ht-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ht-primary);
    background: var(--ht-surface);
    border: 2px solid var(--ht-primary);
    border-radius: var(--ht-radius-full);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.ht-reaction-btn:hover {
    transform: scale(1.04);
    background: var(--ht-primary-light);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.ht-reaction-btn.ht-liked {
    background: var(--ht-primary);
    color: #fff;
    border-color: var(--ht-primary);
}

.ht-reaction-btn.ht-animating {
    animation: htPopReaction 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes htPopReaction {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.ht-reaction-count {
    background: rgba(37, 99, 235, 0.1);
    color: var(--ht-primary);
    padding: 2px 8px;
    border-radius: var(--ht-radius-full);
    font-size: 0.85rem;
    font-weight: 800;
}

.ht-reaction-btn.ht-liked .ht-reaction-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* -------------------------------------------------------------
 * 18. Google E-E-A-T Compliant Rich Author Bio Card
 * ------------------------------------------------------------- */
.ht-author-bio-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    margin: 36px 0;
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: 18px;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
}

.ht-author-avatar-col {
    flex-shrink: 0;
}

.ht-author-bio-avatar {
    width: 86px;
    height: 86px;
    border-radius: var(--ht-radius-full);
    display: block;
    border: 3px solid var(--ht-primary-light);
    box-shadow: 0 0 0 1px var(--ht-primary-border);
    object-fit: cover;
}

.ht-author-details-col {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ht-author-header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ht-author-pretitle {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ht-primary);
    display: block;
    margin-bottom: 2px;
}

.ht-author-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ht-text-primary);
    margin: 0;
}

.ht-author-name a:hover {
    color: var(--ht-primary);
}

.ht-author-eeat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--ht-radius-full);
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.ht-author-bio-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--ht-text-secondary);
    margin-bottom: 16px;
}

.ht-author-footer-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--ht-surface-border);
    flex-wrap: wrap;
}

.ht-author-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--ht-text-muted);
}

.ht-author-all-posts-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ht-primary);
    transition: transform 0.2s ease, color 0.2s ease;
}

.ht-author-all-posts-link:hover {
    transform: translateX(3px);
    color: var(--ht-primary-hover);
}

/* -------------------------------------------------------------
 * 19. Previous / Next Article Navigation Cards
 * ------------------------------------------------------------- */
.ht-post-nav-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 32px 0 36px 0;
}

.ht-nav-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 22px;
    background: var(--ht-surface);
    border: 1px solid var(--ht-surface-border);
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.ht-nav-card:hover {
    transform: translateY(-3px);
    border-color: var(--ht-primary-border);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.ht-nav-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ht-primary);
}

.ht-nav-card-next .ht-nav-card-arrow {
    justify-content: flex-end;
}

.ht-nav-card-next {
    text-align: right;
}

.ht-nav-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.38;
    color: var(--ht-text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.ht-nav-card:hover .ht-nav-card-title {
    color: var(--ht-primary);
}

.ht-nav-card-empty {
    visibility: hidden;
}

/* Responsive Stacking */
@media (max-width: 680px) {
    .ht-author-bio-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 22px 18px;
    }

    .ht-author-header-line {
        justify-content: center;
    }

    .ht-author-footer-line {
        justify-content: center;
    }

    .ht-reaction-card {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
    }

    .ht-post-nav-cards {
        grid-template-columns: 1fr;
    }

    .ht-nav-card-next {
        text-align: left;
    }

    .ht-nav-card-next .ht-nav-card-arrow {
        justify-content: flex-start;
    }
}

/* -------------------------------------------------------------
 * 20. Dark Mode Support for New Components
 * ------------------------------------------------------------- */
[data-theme="dark"] .ht-share-top,
[data-theme="dark"] .ht-share-bottom,
[data-theme="dark"] .ht-author-bio-card,
[data-theme="dark"] .ht-nav-card {
    background: #111827 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ht-share-btn,
[data-theme="dark"] .ht-share-large-btn {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] .ht-reaction-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .ht-reaction-btn {
    background: #111827 !important;
    color: #60a5fa !important;
    border-color: #3b82f6 !important;
}

[data-theme="dark"] .ht-reaction-btn.ht-liked {
    background: #2563eb !important;
    color: #fff !important;
}

[data-theme="dark"] .ht-author-bio-avatar {
    border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .ht-author-eeat-pill {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] .ht-author-bio-text {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ht-author-name a,
[data-theme="dark"] .ht-share-card-title,
[data-theme="dark"] .ht-reaction-question,
[data-theme="dark"] .ht-nav-card-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-author-footer-line {
    border-top-color: #1e293b !important;
}

/* =============================================================
 * 21. Ultra-Modern 2026 Comments & Discussion Area
 * ============================================================= */
.ht-comments-area {
    margin-top: 48px;
    padding: 32px;
    background: var(--ht-surface-card, #ffffff);
    border: 1px solid var(--ht-surface-border, #e2e8f0);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.ht-comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ht-text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ht-surface-border);
}

.ht-comments-title svg {
    color: var(--ht-primary);
}

/* Comment Form Card */
.comment-respond {
    margin-top: 24px;
}

.comment-reply-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ht-text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-reply-title #cancel-comment-reply-link {
    font-size: 0.85rem;
    color: #ef4444;
    font-weight: 600;
    text-decoration: underline;
}

.ht-comment-notes, .comment-notes {
    font-size: 0.88rem;
    color: var(--ht-text-muted);
    margin-bottom: 18px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-form-comment {
    margin: 0;
}

.comment-form-comment textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1.5px solid var(--ht-surface-border, #cbd5e1);
    background: var(--ht-surface-hover, #f8fafc);
    color: var(--ht-text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.2s ease;
    resize: vertical;
    box-sizing: border-box;
}

.comment-form-comment textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    outline: none;
    background: var(--ht-surface, #ffffff);
    border-color: var(--ht-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Author & Email Fields */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ht-text-secondary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid var(--ht-surface-border, #cbd5e1);
    background: var(--ht-surface-hover, #f8fafc);
    color: var(--ht-text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Submit Button */
.form-submit {
    margin: 8px 0 0 0;
}

.form-submit input[type="submit"],
.comment-form #submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--ht-primary, #2563eb) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.25s ease;
}

.form-submit input[type="submit"]:hover,
.comment-form #submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    filter: brightness(1.05);
}

/* Comment List */
.ht-comment-list,
.commentlist {
    list-style: none;
    margin: 0 0 32px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ht-comment-list li.comment {
    background: var(--ht-surface-hover, #f8fafc);
    border: 1px solid var(--ht-surface-border, #e2e8f0);
    border-radius: 16px;
    padding: 20px;
}

.ht-comment-list .comment-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ht-comment-list .comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ht-comment-list .comment-author img {
    border-radius: 50%;
    border: 2px solid var(--ht-surface);
}

.ht-comment-list .fn {
    font-weight: 700;
    color: var(--ht-text-primary);
}

.ht-comment-list .comment-metadata a {
    font-size: 0.8rem;
    color: var(--ht-text-muted);
}

.ht-comment-list .reply a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ht-primary);
}

/* Dark Mode Support for Comments */
[data-theme="dark"] .ht-comments-area {
    background: #111827 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .comment-form-comment textarea,
[data-theme="dark"] .comment-form input[type="text"],
[data-theme="dark"] .comment-form input[type="email"],
[data-theme="dark"] .comment-form input[type="url"] {
    background: #090d16 !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .ht-comment-list li.comment {
    background: #1e293b !important;
    border-color: #334155 !important;
}

@media (max-width: 640px) {
    .ht-comments-area {
        padding: 20px 16px;
        border-radius: 16px;
    }
}

/* ==========================================================================
   HelpTrickBD Official Button Standards (v1.4.9)
   1. Official PDF Download Pill Button (.pdf-download-btn)
   2. Official Source Link / Navigation Pill Button (.source-link-btn)
   ========================================================================== */

/* 1. PDF DOWNLOAD PILL BUTTON */
.pdf-download-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px auto;
}

.pdf-download-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 470px;
  min-height: 60px;
  padding: 7px 10px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e0e5ef;
  border-radius: 14px;
  box-shadow: 0 3px 8px rgba(30, 50, 90, 0.14);
  text-decoration: none !important;
  transition: all 0.25s ease;
  cursor: pointer;
}

.pdf-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(30, 50, 90, 0.20);
  background: #ffffff;
}

.pdf-file-icon {
  width: 38px;
  height: 42px;
  flex-shrink: 0;
  display: block;
}

.pdf-divider {
  width: 2px;
  height: 38px;
  background: #cbd3e2;
  flex-shrink: 0;
  transition: background 0.25s ease;
}

.pdf-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.pdf-title {
  display: block;
  color: #17233d !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

.pdf-download-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #f02d35, #cf101c);
  color: #ffffff !important;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(210, 20, 30, 0.20);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pdf-download-btn:hover .pdf-download-action {
  background: linear-gradient(135deg, #e01b23, #b80914);
  box-shadow: 0 3px 8px rgba(210, 20, 30, 0.35);
  color: #ffffff !important;
}

.pdf-download-action svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* PDF Button Dark Mode */
[data-theme="dark"] .pdf-download-btn,
.dark .pdf-download-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .pdf-download-btn:hover,
.dark .pdf-download-btn:hover {
  background: #243147 !important;
  border-color: #475569 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .pdf-divider,
.dark .pdf-divider {
  background: #334155 !important;
}

[data-theme="dark"] .pdf-title,
.dark .pdf-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .pdf-download-action,
.dark .pdf-download-action {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
}

[data-theme="dark"] .pdf-download-btn:hover .pdf-download-action,
.dark .pdf-download-btn:hover .pdf-download-action {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

/* Timer State Overrides */
.pdf-download-btn.is-counting .pdf-download-action {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3) !important;
}
.pdf-download-btn.is-ready .pdf-download-action {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
}

/* 2. SOURCE LINK PILL BUTTON */
.source-link-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px auto;
}

.source-link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  min-height: 66px;
  padding: 9px 12px 9px 16px;
  box-sizing: border-box;
  text-decoration: none !important;
  background: linear-gradient(120deg, #f4f6ff, #e5ecff);
  border: 1px solid #d5ddff;
  border-radius: 18px;
  box-shadow: 0 4px 8px rgba(50, 75, 160, 0.20),
              0 1px 3px rgba(50, 75, 160, 0.10);
  transition: all 0.25s ease;
  cursor: pointer;
}

.source-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 75, 160, 0.25);
  background: linear-gradient(120deg, #edf1ff, #dce6ff);
}

.source-link-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: #4935e9;
  display: block;
  transition: color 0.25s ease;
}

.source-link-divider {
  width: 2px;
  height: 38px;
  background: #8294ff;
  flex-shrink: 0;
  transition: background 0.25s ease;
}

.source-link-content {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.source-link-title {
  display: block;
  color: #10265c !important;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

.source-link-desc {
  display: block;
  color: #263d79 !important;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

.source-link-arrow {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d8e2ff;
  border-radius: 11px;
  color: #174edb !important;
  transition: all 0.2s ease;
}

.source-link-arrow svg {
  width: 22px;
  height: 22px;
}

.source-link-btn:hover .source-link-arrow {
  background: #2563eb;
  color: #ffffff !important;
  transform: scale(1.04);
}

/* Hover Protection Shield against Theme Collisions */
.source-link-btn:hover,
.source-link-btn:hover .source-link-title,
.source-link-btn:hover .source-link-desc,
.pdf-download-btn:hover,
.pdf-download-btn:hover .pdf-title {
  text-decoration: none !important;
}

/* Source Link Dark Mode */
[data-theme="dark"] .source-link-btn,
.dark .source-link-btn {
  background: linear-gradient(120deg, #1e293b, #172554) !important;
  border-color: #312e81 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .source-link-btn:hover,
.dark .source-link-btn:hover {
  background: linear-gradient(120deg, #243147, #1e3a8a) !important;
  border-color: #4338ca !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .source-link-icon,
.dark .source-link-icon {
  color: #818cf8 !important;
}

[data-theme="dark"] .source-link-divider,
.dark .source-link-divider {
  background: #4338ca !important;
}

[data-theme="dark"] .source-link-title,
.dark .source-link-title {
  color: #e0e7ff !important;
}

[data-theme="dark"] .source-link-desc,
.dark .source-link-desc {
  color: #94a3b8 !important;
}

[data-theme="dark"] .source-link-arrow,
.dark .source-link-arrow {
  background: rgba(37, 99, 235, 0.22) !important;
  color: #60a5fa !important;
}

[data-theme="dark"] .source-link-btn:hover .source-link-arrow,
.dark .source-link-btn:hover .source-link-arrow {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* Responsive Scaling for Mobile Screens (down to 320px) */
@media (max-width: 480px) {
  .pdf-download-btn {
    gap: 7px;
    padding: 6px 7px;
    min-height: 52px;
  }
  .pdf-file-icon {
    width: 32px;
    height: 36px;
  }
  .pdf-divider {
    height: 32px;
  }
  .pdf-title {
    font-size: 14px;
  }
  .pdf-download-action {
    padding: 8px 10px;
    font-size: 12px;
    gap: 5px;
  }
  .pdf-download-action svg {
    width: 16px;
    height: 16px;
  }
  .source-link-btn {
    min-height: 56px;
    gap: 10px;
    padding: 7px 9px 7px 12px;
  }
  .source-link-icon {
    width: 32px;
    height: 32px;
  }
  .source-link-divider {
    height: 32px;
  }
  .source-link-title {
    font-size: 14px;
  }
  .source-link-desc {
    font-size: 11px;
  }
  .source-link-arrow {
    width: 34px;
    height: 34px;
  }
  .source-link-arrow svg {
    width: 18px;
    height: 18px;
  }
}



