/*
Theme Name: Notes Hub Child
Theme URI: https://goppo.xyz
Description: Child theme for Notes Hub. Contains all custom PWA, Chat, and Community logic.
Author: Dr Md Shahriar Kabir
Author URI: https://goppo.xyz
Template: notes-hub
Version: 3.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: notes-hub-child
Tags: blog, news, right-sidebar, custom-menu, custom-colors, custom-logo, featured-images, threaded-comments, translation-ready, sticky-post
*/

/*
 * Notes Hub Child — a WordPress child theme.
 *
 * Copyright (C) 2024–2026 Dr Md Shahriar Kabir
 *
 * This theme is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 2 of the License, or (at your
 * option) any later version.
 *
 * This theme is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this theme. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
 */

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
   ───────────────────────────────────────────────────────────
   Every color below references the parent theme's tokens first
   (which are dark-mode-aware via html.nh-dark and
   body.noteshub-dark-default), then falls back to the parent's
   light-mode defaults if a token is ever missing. This is what
   makes the child theme work in dark mode: instead of hardcoding
   #ffffff, we say "surface" and the parent's token resolver
   handles the light/dark switch automatically.
   ═══════════════════════════════════════════════════════════ */

:root {
    --nhc-primary:      var(--wp--preset--color--primary, var(--nh-primary, #6366f1));
    --nhc-primary-2:    var(--wp--preset--color--primary-2, var(--nh-primary-2, #8b5cf6));

    --nhc-surface:      var(--nh-bg, #ffffff);
    --nhc-surface-soft: var(--nh-bg-soft, #f8fafc);
    --nhc-surface-tint: var(--nh-bg-tint, #f1f5f9);

    --nhc-text:         var(--nh-text, #0f172a);
    --nhc-text-muted:   var(--nh-text-muted, #64748b);
    --nhc-text-faint:   var(--nh-text-faint, #94a3b8);
    --nhc-border:       var(--nh-border, #e2e8f0);
    --nhc-border-soft:  var(--nh-border-soft, #f1f5f9);

    --nhc-radius-lg:    var(--nh-radius, 16px);
    --nhc-radius-md:    var(--nh-radius-sm, 12px);
    --nhc-radius-sm:    var(--nh-radius-xs, 8px);

    --nhc-ease:         var(--nh-ease, cubic-bezier(.4, 0, .2, 1));
    --nhc-ease-out:     var(--nh-ease-out, cubic-bezier(.16, 1, .3, 1));

    /* Primary color with alpha for tinted backgrounds (light + dark). */
    --nhc-primary-soft:   rgba(99, 102, 241, .12);
    --nhc-primary-softer: rgba(99, 102, 241, .06);
}

html.nh-dark,
body.noteshub-dark-default {
    --nhc-primary-soft:   rgba(129, 140, 248, .18);
    --nhc-primary-softer: rgba(129, 140, 248, .08);
}

/* ═══════════════════════════════════════════════════════════
   1. GLOBAL MODERNIZATION & RESETS
   ───────────────────────────────────────────────────────────
   BUGFIX: removed `overflow-x: hidden !important` on html, body.
   The parent theme already applies `overflow-x: clip` (the modern
   primitive that does NOT create a scroll container). Forcing
   `hidden` on both html and body created a double-scroll-container
   trap that broke position:sticky on the header. The parent's
   rules remain authoritative.
   ═══════════════════════════════════════════════════════════ */

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

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

/* ═══════════════════════════════════════════════════════════
   2. MOBILE HEADER FIX
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-header-inner {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .noteshub-header-left {
        flex-shrink: 1 !important;
        min-width: 0 !important;
        overflow: hidden;
    }

    .noteshub-brand, .noteshub-brand img {
        max-width: 100px !important;
        font-size: 16px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .noteshub-search-toggle,
    .noteshub-header-actions button[aria-label="Search"] {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }

    .noteshub-header-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
    }

    .noteshub-icon-btn {
        padding: 8px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    .noteshub-cta span {
        display: none !important;
    }
    .noteshub-cta {
        padding: 8px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .noteshub-menu-toggle {
        display: inline-flex !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   3. MOBILE DRAWER ENHANCEMENTS
   ───────────────────────────────────────────────────────────
   BUGFIX: transition-timing now uses the parent's --nhc-ease-out
   token so the panel opens with the same springy curve as the
   parent theme. Previously overridden to plain `ease`.
   ═══════════════════════════════════════════════════════════ */

.noteshub-mobile-drawer {
    transition: opacity .3s var(--nhc-ease), visibility .3s var(--nhc-ease);
}

.noteshub-mobile-panel {
    transition: transform .3s var(--nhc-ease-out);
    max-width: 85vw;
}

.noteshub-mobile-menu a,
.noteshub-mobile-section a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 16px !important;
    font-size: 16px !important;
}

/* ═══════════════════════════════════════════════════════════
   4. MOBILE FOOTER FIX
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-footer-bottom {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 20px !important;
        padding: 24px 0 !important;
    }

    .noteshub-footer-menu {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .noteshub-footer-menu a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 8px 12px !important;
        font-size: 14px !important;
    }

    .noteshub-footer-cta { width: 100% !important; }

    .noteshub-footer-cta a {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        min-height: 48px;
    }

    .noteshub-footer-widgets {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding-bottom: 24px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   5. SCROLL TO TOP BUTTON
   ───────────────────────────────────────────────────────────
   BUGFIX (critical): the visible-state selector was
   `.noteshub-to-top.is-visible`, but the parent's theme.js adds
   the class `visible` (no `is-` prefix). The child's rule never
   matched, leaving the button permanently `visibility: hidden`.
   Renamed to `.visible` to match. Also: z-index changed from
   9999 to 9990 to match the parent's documented stacking
   hierarchy; transition uses the parent's --nhc-ease token.
   ═══════════════════════════════════════════════════════════ */

.noteshub-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nhc-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--nhc-ease), visibility .3s var(--nhc-ease),
                transform .3s var(--nhc-ease), background .3s var(--nhc-ease),
                box-shadow .3s var(--nhc-ease);
    z-index: 9990;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.noteshub-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.noteshub-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}

@media (max-width: 768px) {
    .noteshub-to-top {
        width: 48px !important;
        height: 48px !important;
        bottom: 80px !important;
        right: 16px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   6. BLOG HOMEPAGE — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nh-blog-header {
        padding: 24px 16px !important;
        text-align: center !important;
    }

    .nh-blog-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    .nh-blog-sub {
        font-size: 15px !important;
        margin-bottom: 16px !important;
    }

    .nh-blog-search-wrap {
        width: 100% !important;
        padding: 0 16px !important;
        box-sizing: border-box !important;
    }

    .nh-blog-search-wrap form,
    .nh-blog-search-wrap .search-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .nh-blog-search-wrap input[type="search"] {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }

    .nh-blog-search-wrap button[type="submit"] {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-weight: 600 !important;
    }

    .nh-featured-post {
        display: flex !important;
        flex-direction: column !important;
        border-radius: var(--nhc-radius-lg) !important;
        overflow: hidden !important;
        margin-bottom: 24px !important;
    }

    .nh-featured-thumb {
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
    }

    .nh-featured-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .nh-featured-body { padding: 16px !important; }

    .nh-featured-title {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    .nh-featured-excerpt {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }

    .nh-featured-footer {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .nh-featured-read {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px !important;
        min-height: 44px !important;
        background: var(--nhc-primary-soft) !important;
        border-radius: var(--nhc-radius-sm) !important;
        margin-top: 8px !important;
    }

    .nh-blog-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 16px !important;
    }

    .nh-blog-pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 30px 16px !important;
    }

    .nh-blog-pagination a,
    .nh-blog-pagination span {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        border-radius: var(--nhc-radius-sm) !important;
        font-size: 14px !important;
        text-decoration: none !important;
    }

    .nh-blog-pagination a {
        background: var(--nhc-surface-tint) !important;
        color: var(--nhc-text) !important;
    }

    .nh-blog-pagination .current {
        background: var(--nhc-primary) !important;
        color: #fff !important;
        font-weight: 700 !important;
    }

    .nh-blog-empty {
        padding: 60px 20px !important;
        text-align: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   7. INDEX / ARCHIVE TEMPLATE — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 16px !important;
    }

    .noteshub-primary { width: 100% !important; }

    .noteshub-sidebar,
    #secondary {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .noteshub-post-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .noteshub-archive-header {
        text-align: center !important;
        padding: 24px 0 !important;
    }

    .noteshub-archive-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
    }

    .noteshub-archive-desc {
        font-size: 15px !important;
        color: var(--nhc-text-muted) !important;
    }

    .noteshub-pagination,
    .navigation.pagination,
    nav.pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 30px 0 !important;
        margin-top: 20px !important;
    }

    .noteshub-pagination a,
    .noteshub-pagination span,
    .navigation.pagination a,
    .navigation.pagination span,
    nav.pagination a,
    nav.pagination span {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        border-radius: var(--nhc-radius-sm) !important;
        font-size: 15px !important;
        text-decoration: none !important;
        background: var(--nhc-surface-tint) !important;
        color: var(--nhc-text) !important;
        box-sizing: border-box !important;
    }

    .noteshub-pagination .current,
    .navigation.pagination .current,
    nav.pagination .current {
        background: var(--nhc-primary) !important;
        color: #fff !important;
        font-weight: 700 !important;
    }

    .noteshub-pagination a:hover,
    .navigation.pagination a:hover,
    nav.pagination a:hover {
        background: var(--nhc-border) !important;
    }

    .noteshub-empty {
        padding: 60px 20px !important;
        text-align: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   8. HERO SECTION — MOBILE
   ───────────────────────────────────────────────────────────
   BUGFIX: the parent's hero uses .noteshub-hero* classes, not
   .hero*. Rewrote the selectors to match the actual markup. The
   earlier version's rules were dead code.
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-hero--duplicate-brand {
        display: none !important;
    }

    .noteshub-hero {
        padding: 40px 20px !important;
        text-align: center !important;
    }

    .noteshub-hero-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 12px !important;
    }

    .noteshub-hero-lead {
        font-size: 16px !important;
        margin-bottom: 20px !important;
        color: var(--nhc-text-muted) !important;
    }

    .noteshub-hero-cta .noteshub-cta {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 48px !important;
        padding: 14px 32px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        box-shadow: 0 4px 12px var(--nhc-primary-soft) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   9. SINGLE POST — MOBILE
   ───────────────────────────────────────────────────────────
   BUGFIX: removed .post-navigation-wrapper (dead class). The
   parent has no wrapper; the child's stacking rules now target
   the actual .nav-links grid.
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-layout-single {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 16px !important;
    }

    .noteshub-layout-single .noteshub-primary { width: 100% !important; }

    .noteshub-layout-single .noteshub-sidebar,
    .noteshub-layout-single #secondary {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .noteshub-primary img,
    .entry-content img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .post-navigation {
        margin-top: 40px !important;
        padding-top: 20px !important;
        border-top: 1px solid var(--nhc-border) !important;
    }

    .post-navigation .nav-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .post-navigation a {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 16px !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: var(--nhc-radius-md) !important;
        text-decoration: none !important;
        color: var(--nhc-text) !important;
        min-height: 60px !important;
        border: 1px solid var(--nhc-border) !important;
    }

    .post-navigation .nav-previous { text-align: left !important; }

    .post-navigation .nav-next {
        text-align: right !important;
        align-items: flex-end !important;
    }

    .noteshub-nav-label {
        font-size: 12px !important;
        text-transform: uppercase !important;
        color: var(--nhc-text-muted) !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
        letter-spacing: .5px !important;
    }

    .noteshub-nav-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: var(--nhc-primary) !important;
        line-height: 1.4 !important;
    }

    .comment-respond { margin-top: 40px !important; }

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        margin-bottom: 15px !important;
    }

    .comment-form textarea { min-height: 120px !important; }

    .comment-form .submit,
    .comment-form input[type="submit"] {
        width: 100% !important;
        min-height: 48px !important;
        justify-content: center !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        background: var(--nhc-primary) !important;
        color: #ffffff !important;
    }

    .comment-list .comment {
        padding: 16px !important;
        margin-bottom: 16px !important;
        border-radius: var(--nhc-radius-md) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   10. SINGLE POST CONTENT — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-single-header { margin-bottom: 20px !important; }

    .noteshub-single-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 12px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .noteshub-single-thumb {
        margin-bottom: 24px !important;
        border-radius: var(--nhc-radius-md) !important;
        overflow: hidden !important;
    }

    .noteshub-single-thumb .noteshub-featured-img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .noteshub-single-content {
        font-size: 16px !important;
        line-height: 1.7 !important;
        color: var(--nhc-text) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .noteshub-single-content p { margin-bottom: 20px !important; }

    .noteshub-single-content img,
    .noteshub-single-content video,
    .noteshub-single-content iframe,
    .noteshub-single-content embed,
    .noteshub-single-content object {
        max-width: 100% !important;
        height: auto !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .noteshub-single-content iframe[src*="youtube"],
    .noteshub-single-content iframe[src*="vimeo"] {
        aspect-ratio: 16 / 9 !important;
        width: 100% !important;
    }

    .noteshub-single-content blockquote {
        padding: 16px 20px !important;
        margin: 20px 0 !important;
        border-left: 4px solid var(--nhc-primary) !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 0 var(--nhc-radius-sm) var(--nhc-radius-sm) 0 !important;
        font-style: italic !important;
        font-size: 15px !important;
    }

    .noteshub-single-content pre,
    .noteshub-single-content code {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        font-size: 13px !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .noteshub-single-content table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-collapse: collapse !important;
        font-size: 14px !important;
    }

    .noteshub-page-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 24px 0 !important;
    }

    .noteshub-page-links a,
    .noteshub-page-links span {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 14px !important;
        background: var(--nhc-surface-tint) !important;
        border-radius: var(--nhc-radius-sm) !important;
        text-decoration: none !important;
        color: var(--nhc-text) !important;
        font-weight: 600 !important;
    }

    .noteshub-terms-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-top: 30px !important;
        padding-top: 20px !important;
        border-top: 1px solid var(--nhc-border) !important;
    }

    .noteshub-terms-list a {
        padding: 8px 14px !important;
        background: var(--nhc-primary-soft) !important;
        color: var(--nhc-primary) !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        min-height: 36px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   11. PAGE TEMPLATE — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-layout-page {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 16px !important;
    }

    .noteshub-layout-page .noteshub-primary { width: 100% !important; }

    .noteshub-layout-page .noteshub-sidebar,
    .noteshub-layout-page #secondary {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .noteshub-layout-page img,
    .noteshub-layout-page .entry-content img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .noteshub-layout-page .noteshub-single-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .noteshub-page-comments {
        margin-top: 40px !important;
        padding-top: 20px !important;
        border-top: 1px solid var(--nhc-border) !important;
    }

    .noteshub-page-comments .comment-form input[type="text"],
    .noteshub-page-comments .comment-form input[type="email"],
    .noteshub-page-comments .comment-form textarea {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        margin-bottom: 15px !important;
    }

    .noteshub-page-comments .comment-form textarea { min-height: 120px !important; }

    .noteshub-page-comments .comment-form .submit,
    .noteshub-page-comments .comment-form input[type="submit"] {
        width: 100% !important;
        min-height: 48px !important;
        justify-content: center !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        background: var(--nhc-primary) !important;
        color: #ffffff !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   12. PAGE CONTENT & FOOTER — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-page-footer {
        margin-top: 40px !important;
        padding-top: 20px !important;
        border-top: 1px solid var(--nhc-border) !important;
    }

    .noteshub-edit-link-wrap {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .noteshub-page-footer .edit-link a,
    .noteshub-page-footer .edit-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 24px !important;
        background: var(--nhc-surface-tint) !important;
        color: var(--nhc-primary) !important;
        border-radius: 10px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        min-height: 44px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border: 1px solid var(--nhc-border) !important;
    }

    .noteshub-page .noteshub-single-content {
        font-size: 16px !important;
        line-height: 1.7 !important;
        color: var(--nhc-text) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .noteshub-page .noteshub-single-content p { margin-bottom: 20px !important; }

    .noteshub-page .noteshub-single-content img,
    .noteshub-page .noteshub-single-content video,
    .noteshub-page .noteshub-single-content iframe,
    .noteshub-page .noteshub-single-content embed,
    .noteshub-page .noteshub-single-content object {
        max-width: 100% !important;
        height: auto !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .noteshub-page .noteshub-single-content iframe[src*="youtube"],
    .noteshub-page .noteshub-single-content iframe[src*="vimeo"] {
        aspect-ratio: 16 / 9 !important;
        width: 100% !important;
    }

    .noteshub-page .noteshub-single-content blockquote {
        padding: 16px 20px !important;
        margin: 20px 0 !important;
        border-left: 4px solid var(--nhc-primary) !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 0 var(--nhc-radius-sm) var(--nhc-radius-sm) 0 !important;
        font-style: italic !important;
        font-size: 15px !important;
    }

    .noteshub-page .noteshub-single-content pre,
    .noteshub-page .noteshub-single-content code {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        font-size: 13px !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .noteshub-page .noteshub-single-content table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-collapse: collapse !important;
        font-size: 14px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   13. ARCHIVE TEMPLATE — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-archive-icon {
        display: block !important;
        font-size: 48px !important;
        line-height: 1 !important;
        margin-bottom: 12px !important;
    }

    .noteshub-archive-title {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 0 !important;
    }

    .noteshub-archive-desc {
        max-width: 100% !important;
        padding: 0 8px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    .noteshub-archive-header {
        background: linear-gradient(135deg, var(--nhc-primary-softer), rgba(139, 92, 246, .02)) !important;
        border-radius: var(--nhc-radius-lg) !important;
        margin: 0 0 24px 0 !important;
        padding: 32px 16px !important;
        border: 1px solid var(--nhc-primary-soft) !important;
    }

    .noteshub-layout .noteshub-primary { width: 100% !important; }

    .noteshub-layout .noteshub-sidebar,
    .noteshub-layout #secondary {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .noteshub-post-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (min-width: 769px) {
    .noteshub-archive-icon {
        display: inline-block !important;
        margin-right: 8px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   14. SEARCH RESULTS — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-search-again {
        background: linear-gradient(135deg, var(--nhc-primary-softer), rgba(139, 92, 246, .02)) !important;
        border: 1px solid var(--nhc-primary-soft) !important;
        border-radius: var(--nhc-radius-lg) !important;
        padding: 20px 16px !important;
        margin: 0 0 28px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .noteshub-search-again-label {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: var(--nhc-text-muted) !important;
        margin: 0 0 12px 0 !important;
        text-align: center !important;
    }

    .noteshub-search-again form,
    .noteshub-search-again .search-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .noteshub-search-again input[type="search"] {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }

    .noteshub-search-again button[type="submit"] {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-weight: 600 !important;
    }

    .noteshub-search-count {
        font-size: 14px !important;
        color: var(--nhc-text-muted) !important;
        font-weight: 500 !important;
        margin: 8px 0 0 0 !important;
        text-align: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   15. POST CARD (.noteshub-card) — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-card {
        display: flex !important;
        flex-direction: column !important;
        background: var(--nhc-surface) !important;
        border-radius: var(--nhc-radius-lg) !important;
        overflow: hidden !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, .06) !important;
        border: 1px solid var(--nhc-border) !important;
        transition: transform .2s var(--nhc-ease) !important;
    }

    .noteshub-card:active { transform: scale(.98) !important; }

    .noteshub-card-thumb {
        display: block !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        overflow: hidden !important;
        background: var(--nhc-surface-tint) !important;
    }

    .noteshub-card-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    .noteshub-card-body {
        padding: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .noteshub-card-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        font-weight: 700 !important;
        color: var(--nhc-text) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .noteshub-card-title a {
        text-decoration: none !important;
        color: inherit !important;
    }

    .noteshub-card-title a:active { color: var(--nhc-primary) !important; }

    .noteshub-card-meta {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 12px !important;
        color: var(--nhc-text-muted) !important;
        font-weight: 500 !important;
    }

    .noteshub-meta-sep { color: var(--nhc-text-faint) !important; }

    .noteshub-card-excerpt {
        font-size: 14px !important;
        line-height: 1.6 !important;
        color: var(--nhc-text-muted) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 0 !important;
    }

    .noteshub-card-excerpt p { margin: 0 !important; }

    .noteshub-card-more {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 20px !important;
        background: var(--nhc-primary-soft) !important;
        color: var(--nhc-primary) !important;
        border-radius: 10px !important;
        text-decoration: none !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        margin-top: 4px !important;
        transition: background .15s var(--nhc-ease) !important;
    }

    .noteshub-card-more:active { background: var(--nhc-primary-soft) !important; }

    .noteshub-card-more svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   16. EMPTY STATE — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-empty {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 60px 20px !important;
        background: linear-gradient(135deg, var(--nhc-primary-softer), rgba(139, 92, 246, .01)) !important;
        border-radius: 20px !important;
        border: 1px dashed var(--nhc-primary-soft) !important;
        margin: 20px 0 !important;
        box-sizing: border-box !important;
    }

    .noteshub-empty-icon {
        font-size: 72px !important;
        line-height: 1 !important;
        margin-bottom: 20px !important;
        display: block !important;
        filter: grayscale(.2) !important;
    }

    .noteshub-empty-title {
        font-size: 24px !important;
        font-weight: 800 !important;
        color: var(--nhc-text) !important;
        margin: 0 0 8px 0 !important;
        line-height: 1.2 !important;
    }

    .noteshub-empty-text {
        font-size: 15px !important;
        color: var(--nhc-text-muted) !important;
        line-height: 1.6 !important;
        margin: 0 0 24px 0 !important;
        max-width: 100% !important;
    }

    .noteshub-empty-search {
        width: 100% !important;
        margin-bottom: 24px !important;
    }

    .noteshub-empty-search form,
    .noteshub-empty-search .search-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .noteshub-empty-search input[type="search"] {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }

    .noteshub-empty-search button[type="submit"] {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-weight: 600 !important;
    }

    .noteshub-empty-home-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        min-height: 48px !important;
        padding: 14px 24px !important;
        background: var(--nhc-text) !important;
        color: var(--nhc-surface) !important;
        border-radius: 10px !important;
        text-decoration: none !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        transition: background .15s var(--nhc-ease) !important;
        box-sizing: border-box !important;
    }

    .noteshub-empty-home-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   17. BLOG CARD (.nh-post-card) — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nh-post-card {
        display: flex !important;
        flex-direction: column !important;
        background: var(--nhc-surface) !important;
        border-radius: var(--nhc-radius-lg) !important;
        overflow: hidden !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, .06) !important;
        border: 1px solid var(--nhc-border) !important;
        transition: transform .2s var(--nhc-ease), box-shadow .2s var(--nhc-ease) !important;
    }

    .nh-post-card:active {
        transform: scale(.98) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .08) !important;
    }

    .nh-post-thumb {
        display: block !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        overflow: hidden !important;
        background: var(--nhc-surface-tint) !important;
        position: relative !important;
    }

    .nh-post-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    .nh-post-thumb-placeholder {
        background: linear-gradient(135deg, var(--nhc-primary), var(--nhc-primary-2)) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .nh-post-thumb-placeholder span {
        font-size: 64px !important;
        font-weight: 900 !important;
        color: #ffffff !important;
        opacity: .9 !important;
        text-shadow: 0 4px 12px rgba(0, 0, 0, .15) !important;
        line-height: 1 !important;
    }

    .nh-post-body {
        padding: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .nh-post-meta {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        font-size: 12px !important;
        color: var(--nhc-text-muted) !important;
        font-weight: 500 !important;
    }

    .nh-post-cat {
        display: inline-flex !important;
        align-items: center !important;
        padding: 4px 10px !important;
        background: var(--nhc-primary-soft) !important;
        color: var(--nhc-primary) !important;
        border-radius: 999px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        text-transform: uppercase !important;
        letter-spacing: .3px !important;
        min-height: 24px !important;
    }

    .nh-post-title {
        font-size: 19px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        font-weight: 700 !important;
        color: var(--nhc-text) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .nh-post-title a {
        text-decoration: none !important;
        color: inherit !important;
    }

    .nh-post-title a:active { color: var(--nhc-primary) !important; }

    .nh-post-excerpt {
        font-size: 14px !important;
        line-height: 1.6 !important;
        color: var(--nhc-text-muted) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 0 !important;
    }

    .nh-post-footer {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding-top: 12px !important;
        border-top: 1px solid var(--nhc-border-soft) !important;
        margin-top: 4px !important;
    }

    .nh-post-avatar {
        width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        border: 2px solid var(--nhc-border) !important;
    }

    .nh-post-author {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: var(--nhc-text) !important;
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .nh-post-read {
        font-size: 12px !important;
        color: var(--nhc-text-muted) !important;
        font-weight: 500 !important;
        flex-shrink: 0 !important;
        background: var(--nhc-surface-tint) !important;
        padding: 4px 10px !important;
        border-radius: 999px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   18. SIDEBAR WIDGETS — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-sidebar,
    #secondary {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        width: 100% !important;
        margin-top: 30px !important;
        padding-top: 30px !important;
        border-top: 1px solid var(--nhc-border) !important;
    }

    .noteshub-sidebar .widget,
    #secondary .widget {
        background: var(--nhc-surface) !important;
        border: 1px solid var(--nhc-border) !important;
        border-radius: var(--nhc-radius-lg) !important;
        padding: 20px 18px !important;
        margin: 0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .03) !important;
        box-sizing: border-box !important;
    }

    .noteshub-sidebar .widget-title,
    #secondary .widget-title,
    .noteshub-sidebar .widget h2,
    #secondary .widget h2 {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: var(--nhc-text) !important;
        margin: 0 0 16px 0 !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid var(--nhc-border-soft) !important;
        text-transform: uppercase !important;
        letter-spacing: .4px !important;
        line-height: 1.3 !important;
    }

    .noteshub-sidebar .widget ul,
    #secondary .widget ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .noteshub-sidebar .widget ul li,
    #secondary .widget ul li {
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid var(--nhc-border-soft) !important;
    }

    .noteshub-sidebar .widget ul li:last-child,
    #secondary .widget ul li:last-child { border-bottom: none !important; }

    .noteshub-sidebar .widget a,
    #secondary .widget a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 4px !important;
        min-height: 44px !important;
        color: var(--nhc-text) !important;
        text-decoration: none !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        line-height: 1.4 !important;
        transition: color .15s var(--nhc-ease) !important;
        box-sizing: border-box !important;
    }

    .noteshub-sidebar .widget a:active,
    #secondary .widget a:active { color: var(--nhc-primary) !important; }

    .noteshub-sidebar .widget .count,
    #secondary .widget .count,
    .noteshub-sidebar .widget .post-count,
    #secondary .widget .post-count {
        background: var(--nhc-surface-tint) !important;
        color: var(--nhc-text-muted) !important;
        padding: 2px 10px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        flex-shrink: 0 !important;
    }

    .noteshub-sidebar .widget .tagcloud,
    #secondary .widget .tagcloud,
    .noteshub-sidebar .wp-block-tag-cloud,
    #secondary .wp-block-tag-cloud {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .noteshub-sidebar .widget .tagcloud a,
    #secondary .widget .tagcloud a,
    .noteshub-sidebar .wp-block-tag-cloud a,
    #secondary .wp-block-tag-cloud a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 14px !important;
        background: var(--nhc-primary-soft) !important;
        color: var(--nhc-primary) !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        min-height: 36px !important;
        width: auto !important;
        box-sizing: border-box !important;
    }

    .noteshub-sidebar .widget .search-form,
    #secondary .widget .search-form,
    .noteshub-sidebar .widget form,
    #secondary .widget form {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .noteshub-sidebar .widget input[type="search"],
    #secondary .widget input[type="search"],
    .noteshub-sidebar .widget input[type="text"],
    #secondary .widget input[type="text"] {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        border-radius: 10px !important;
        border: 1px solid var(--nhc-border) !important;
        font-size: 16px !important;
        box-sizing: border-box !important;
    }

    .noteshub-sidebar .widget button[type="submit"],
    #secondary .widget button[type="submit"],
    .noteshub-sidebar .widget input[type="submit"],
    #secondary .widget input[type="submit"] {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 20px !important;
        border-radius: 10px !important;
        background: var(--nhc-primary) !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        border: none !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
    }

    .noteshub-sidebar .widget .textwidget,
    #secondary .widget .textwidget {
        font-size: 15px !important;
        line-height: 1.6 !important;
        color: var(--nhc-text-muted) !important;
    }

    .noteshub-sidebar .widget .textwidget p,
    #secondary .widget .textwidget p { margin-bottom: 12px !important; }

    .noteshub-sidebar .widget .textwidget p:last-child,
    #secondary .widget .textwidget p:last-child { margin-bottom: 0 !important; }

    .noteshub-sidebar .widget select,
    #secondary .widget select {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        border-radius: 10px !important;
        border: 1px solid var(--nhc-border) !important;
        font-size: 15px !important;
        background: var(--nhc-surface) !important;
        box-sizing: border-box !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   19. COMMENTS — MOBILE
   (Section abbreviated here for clarity; retains all original
    rules but with --nhc-* tokens replacing hardcoded colors.)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-comments {
        margin-top: 40px !important;
        padding-top: 30px !important;
        border-top: 1px solid var(--nhc-border) !important;
    }

    .noteshub-comments-title {
        font-size: 20px !important;
        font-weight: 800 !important;
        color: var(--nhc-text) !important;
        margin: 0 0 20px 0 !important;
        line-height: 1.3 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .noteshub-comment-list,
    .noteshub-comments ol.comment-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .noteshub-comment-list .comment,
    .noteshub-comments .comment {
        background: var(--nhc-surface) !important;
        border: 1px solid var(--nhc-border) !important;
        border-radius: var(--nhc-radius-lg) !important;
        padding: 16px !important;
        margin: 0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .03) !important;
        box-sizing: border-box !important;
    }

    .noteshub-comment-list .children,
    .noteshub-comments .children {
        list-style: none !important;
        margin: 12px 0 0 0 !important;
        border-left: 3px solid var(--nhc-primary-soft) !important;
        padding-left: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .noteshub-comment-list .children .comment,
    .noteshub-comments .children .comment {
        background: var(--nhc-surface-soft) !important;
        border-radius: var(--nhc-radius-md) !important;
    }

    .noteshub-comment-list .comment-body,
    .noteshub-comments .comment-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .noteshub-comment-list .comment-author,
    .noteshub-comments .comment-author {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .noteshub-comment-list .comment-author .avatar,
    .noteshub-comments .comment-author .avatar {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        border: 2px solid var(--nhc-border) !important;
        margin: 0 !important;
    }

    .noteshub-comment-list .comment-author .fn,
    .noteshub-comments .comment-author .fn {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: var(--nhc-text) !important;
        font-style: normal !important;
        line-height: 1.3 !important;
    }

    .noteshub-comment-list .comment-author .says,
    .noteshub-comments .comment-author .says { display: none !important; }

    .noteshub-comment-list .comment-meta,
    .noteshub-comments .comment-meta,
    .noteshub-comment-list .comment-metadata,
    .noteshub-comments .comment-metadata {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        font-size: 12px !important;
        color: var(--nhc-text-muted) !important;
    }

    .noteshub-comment-list .comment-meta a,
    .noteshub-comments .comment-meta a,
    .noteshub-comment-list .comment-metadata a,
    .noteshub-comments .comment-metadata a {
        color: var(--nhc-text-muted) !important;
        text-decoration: none !important;
        font-size: 12px !important;
    }

    .noteshub-comment-list time,
    .noteshub-comments time {
        font-size: 12px !important;
        color: var(--nhc-text-faint) !important;
    }

    .noteshub-comment-list .comment-content,
    .noteshub-comments .comment-content {
        font-size: 15px !important;
        line-height: 1.6 !important;
        color: var(--nhc-text) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        margin: 0 !important;
    }

    .noteshub-comment-list .comment-content p,
    .noteshub-comments .comment-content p { margin-bottom: 12px !important; }

    .noteshub-comment-list .comment-content p:last-child,
    .noteshub-comments .comment-content p:last-child { margin-bottom: 0 !important; }

    .noteshub-comment-list .comment-content img,
    .noteshub-comments .comment-content img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: var(--nhc-radius-sm) !important;
    }

    .noteshub-comment-list .comment-content blockquote,
    .noteshub-comments .comment-content blockquote {
        padding: 12px 16px !important;
        margin: 12px 0 !important;
        border-left: 3px solid var(--nhc-primary) !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 0 var(--nhc-radius-sm) var(--nhc-radius-sm) 0 !important;
        font-size: 14px !important;
    }

    .noteshub-comment-list .reply,
    .noteshub-comments .reply { margin-top: 8px !important; }

    .noteshub-comment-list .reply a,
    .noteshub-comments .reply a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 16px !important;
        background: var(--nhc-primary-soft) !important;
        color: var(--nhc-primary) !important;
        border-radius: var(--nhc-radius-sm) !important;
        text-decoration: none !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        min-height: 40px !important;
        box-sizing: border-box !important;
    }

    .noteshub-comment-list .reply a::before,
    .noteshub-comments .reply a::before {
        content: "↩ " !important;
        margin-right: 4px !important;
    }

    .noteshub-comments .comment-navigation,
    .noteshub-comments .comments-pagination,
    .noteshub-comments .navigation.comment-navigation {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin: 24px 0 0 0 !important;
        padding: 0 !important;
    }

    .noteshub-comments .comment-navigation a,
    .noteshub-comments .comments-pagination a,
    .noteshub-comments .nav-links a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 !important;
        min-width: 0 !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        background: var(--nhc-surface-tint) !important;
        color: var(--nhc-text) !important;
        border-radius: 10px !important;
        text-decoration: none !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .noteshub-comment-form,
    .noteshub-comments .comment-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin-top: 30px !important;
    }

    .noteshub-comment-form .comment-reply-title,
    .noteshub-comments .comment-reply-title {
        font-size: 18px !important;
        font-weight: 800 !important;
        color: var(--nhc-text) !important;
        margin: 0 !important;
        line-height: 1.3 !important;
    }

    .noteshub-comment-form .comment-reply-title small,
    .noteshub-comments .comment-reply-title small {
        display: block !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: var(--nhc-text-muted) !important;
        margin-top: 4px !important;
    }

    .noteshub-comment-form p,
    .noteshub-comments .comment-form p {
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .noteshub-comment-form label,
    .noteshub-comments .comment-form label {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: var(--nhc-text) !important;
        margin: 0 !important;
    }

    .noteshub-comment-form .required,
    .noteshub-comments .comment-form .required { color: #ef4444 !important; }

    .noteshub-comment-form input[type="text"],
    .noteshub-comment-form input[type="email"],
    .noteshub-comment-form input[type="url"],
    .noteshub-comment-form textarea,
    .noteshub-comments .comment-form input[type="text"],
    .noteshub-comments .comment-form input[type="email"],
    .noteshub-comments .comment-form input[type="url"],
    .noteshub-comments .comment-form textarea {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border: 1px solid var(--nhc-border) !important;
        border-radius: 10px !important;
        background: var(--nhc-surface) !important;
        color: var(--nhc-text) !important;
        box-sizing: border-box !important;
        font-family: inherit !important;
        transition: border-color .15s var(--nhc-ease), box-shadow .15s var(--nhc-ease) !important;
    }

    .noteshub-comment-form input:focus,
    .noteshub-comment-form textarea:focus,
    .noteshub-comments .comment-form input:focus,
    .noteshub-comments .comment-form textarea:focus {
        outline: none !important;
        border-color: var(--nhc-primary) !important;
        box-shadow: 0 0 0 3px var(--nhc-primary-soft) !important;
    }

    .noteshub-comment-form textarea,
    .noteshub-comments .comment-form textarea {
        min-height: 120px !important;
        resize: vertical !important;
        line-height: 1.6 !important;
    }

    .noteshub-comment-form .comment-form-cookies-consent,
    .noteshub-comments .comment-form-cookies-consent {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
        color: var(--nhc-text-muted) !important;
        padding: 12px 16px !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 10px !important;
    }

    .noteshub-comment-form .comment-form-cookies-consent input[type="checkbox"],
    .noteshub-comments .comment-form-cookies-consent input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        min-height: 20px !important;
        margin: 2px 0 0 0 !important;
        flex-shrink: 0 !important;
        accent-color: var(--nhc-primary) !important;
        cursor: pointer !important;
    }

    .noteshub-comment-form .comment-form-cookies-consent label,
    .noteshub-comments .comment-form-cookies-consent label {
        font-size: 13px !important;
        font-weight: 500 !important;
        color: var(--nhc-text-muted) !important;
        cursor: pointer !important;
        margin: 0 !important;
    }

    .noteshub-comment-form .form-submit,
    .noteshub-comments .comment-form .form-submit {
        margin: 8px 0 0 0 !important;
        padding: 0 !important;
    }

    .noteshub-comment-form button[type="submit"],
    .noteshub-comments .comment-form button[type="submit"] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 24px !important;
        background: linear-gradient(135deg, var(--nhc-primary), var(--nhc-primary-2)) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 10px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        transition: transform .15s var(--nhc-ease), box-shadow .15s var(--nhc-ease) !important;
        box-shadow: 0 4px 12px var(--nhc-primary-soft) !important;
        box-sizing: border-box !important;
        font-family: inherit !important;
    }

    .noteshub-comment-form .logged-in-as,
    .noteshub-comments .comment-form .logged-in-as {
        font-size: 13px !important;
        color: var(--nhc-text-muted) !important;
        margin: 0 !important;
        padding: 12px 16px !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 10px !important;
        line-height: 1.5 !important;
    }

    .noteshub-comment-form .logged-in-as a,
    .noteshub-comments .comment-form .logged-in-as a {
        color: var(--nhc-primary) !important;
        text-decoration: none !important;
        font-weight: 600 !important;
    }

    .noteshub-comment-form .comment-notes,
    .noteshub-comments .comment-form .comment-notes,
    .noteshub-comment-form .comment-form-allowed-tags,
    .noteshub-comments .comment-form .comment-form-allowed-tags {
        font-size: 12px !important;
        color: var(--nhc-text-faint) !important;
        line-height: 1.5 !important;
        margin: 0 !important;
    }

    .noteshub-comment-list .pingback .comment-body,
    .noteshub-comment-list .trackback .comment-body,
    .noteshub-comments .pingback .comment-body,
    .noteshub-comments .trackback .comment-body {
        font-size: 14px !important;
        color: var(--nhc-text-muted) !important;
        padding: 12px !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 10px !important;
    }

    .noteshub-comments .no-comments {
        font-size: 14px !important;
        color: var(--nhc-text-muted) !important;
        padding: 20px !important;
        background: var(--nhc-surface-soft) !important;
        border-radius: 10px !important;
        text-align: center !important;
    }

    .noteshub-comment-list .bypostauthor > .comment-body::before,
    .noteshub-comments .bypostauthor > .comment-body::before {
        content: "AUTHOR" !important;
        display: inline-block !important;
        background: linear-gradient(135deg, var(--nhc-primary), var(--nhc-primary-2)) !important;
        color: #ffffff !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        padding: 3px 8px !important;
        border-radius: 999px !important;
        letter-spacing: .5px !important;
        margin-bottom: 8px !important;
    }

    .noteshub-comment-list .comment-awaiting-moderation,
    .noteshub-comments .comment-awaiting-moderation {
        display: block !important;
        font-size: 12px !important;
        color: #f59e0b !important;
        background: #fffbeb !important;
        padding: 8px 12px !important;
        border-radius: var(--nhc-radius-sm) !important;
        margin-bottom: 8px !important;
        font-weight: 600 !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   20. SEARCH FORM — MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-searchform {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .noteshub-search-field {
        position: relative !important;
        width: 100% !important;
        display: block !important;
    }

    .noteshub-searchform .noteshub-search-icon {
        position: absolute !important;
        left: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 18px !important;
        height: 18px !important;
        color: var(--nhc-text-faint) !important;
        pointer-events: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 2 !important;
    }

    .noteshub-searchform .noteshub-search-icon svg {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
        stroke: currentColor !important;
    }

    .noteshub-searchform .noteshub-search-input,
    .noteshub-searchform input[type="search"] {
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 16px 14px 46px !important;
        font-size: 16px !important;
        border: 1px solid var(--nhc-border) !important;
        border-radius: var(--nhc-radius-md) !important;
        background: var(--nhc-surface) !important;
        color: var(--nhc-text) !important;
        box-sizing: border-box !important;
        font-family: inherit !important;
        transition: border-color .15s var(--nhc-ease), box-shadow .15s var(--nhc-ease) !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        outline: none !important;
        margin: 0 !important;
    }

    .noteshub-searchform .noteshub-search-input::-webkit-search-cancel-button,
    .noteshub-searchform input[type="search"]::-webkit-search-cancel-button {
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .noteshub-searchform .noteshub-search-input:focus,
    .noteshub-searchform input[type="search"]:focus {
        border-color: var(--nhc-primary) !important;
        box-shadow: 0 0 0 3px var(--nhc-primary-soft) !important;
    }

    .noteshub-searchform .noteshub-search-input::placeholder,
    .noteshub-searchform input[type="search"]::placeholder {
        color: var(--nhc-text-faint) !important;
        font-size: 15px !important;
    }

    .noteshub-searchform .noteshub-search-submit,
    .noteshub-searchform button[type="submit"] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 24px !important;
        background: linear-gradient(135deg, var(--nhc-primary), var(--nhc-primary-2)) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: var(--nhc-radius-md) !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        font-family: inherit !important;
        transition: transform .15s var(--nhc-ease), box-shadow .15s var(--nhc-ease) !important;
        box-shadow: 0 4px 12px var(--nhc-primary-soft) !important;
        box-sizing: border-box !important;
        text-decoration: none !important;
    }

    .noteshub-searchform .noteshub-search-submit:active,
    .noteshub-searchform button[type="submit"]:active {
        transform: scale(.98) !important;
        box-shadow: 0 2px 8px var(--nhc-primary-soft) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   21. 404 PAGE — MOBILE
   ───────────────────────────────────────────────────────────
   BUGFIX: the previous version targeted .noteshub-404-search,
   which does not exist in the parent markup. The 404 search form
   uses the standard .noteshub-searchform inside .noteshub-404.
   Updated selector accordingly.
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .noteshub-404 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 16px 60px 16px !important;
        min-height: 60vh !important;
        box-sizing: border-box !important;
    }

    .noteshub-404-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 480px !important;
        padding: 40px 24px !important;
        background: var(--nhc-surface) !important;
        border: 1px solid var(--nhc-border) !important;
        border-radius: 20px !important;
        box-shadow: 0 12px 40px -12px rgba(15, 23, 42, .12) !important;
        box-sizing: border-box !important;
    }

    .noteshub-404-num {
        font-size: 96px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
        background: linear-gradient(135deg, var(--nhc-primary), var(--nhc-primary-2)) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        color: transparent !important;
        margin-bottom: 16px !important;
        letter-spacing: -.03em !important;
        font-family: system-ui, -apple-system, sans-serif !important;
    }

    .noteshub-404-title {
        font-size: 22px !important;
        font-weight: 800 !important;
        color: var(--nhc-text) !important;
        line-height: 1.3 !important;
        margin: 0 0 12px 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .noteshub-404-sub {
        font-size: 15px !important;
        color: var(--nhc-text-muted) !important;
        line-height: 1.6 !important;
        margin: 0 0 28px 0 !important;
        max-width: 100% !important;
    }

    /* The 404 uses .noteshub-searchform — section 20 already styles it. */

    .noteshub-404-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        margin-top: 8px !important;
    }

    .noteshub-404-actions .noteshub-cta {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 24px !important;
        background: linear-gradient(135deg, var(--nhc-primary), var(--nhc-primary-2)) !important;
        color: #ffffff !important;
        border-radius: var(--nhc-radius-md) !important;
        text-decoration: none !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 12px var(--nhc-primary-soft) !important;
        box-sizing: border-box !important;
        text-align: center !important;
        border: none !important;
    }

    .noteshub-404-actions .noteshub-cta svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }

    .noteshub-404-actions .noteshub-cta-secondary {
        background: var(--nhc-surface) !important;
        color: var(--nhc-primary) !important;
        border: 1.5px solid var(--nhc-border) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .04) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   22. GENERAL MOBILE UX IMPROVEMENTS
   ───────────────────────────────────────────────────────────
   BUGFIX: removed `display: inline-flex` and `justify-content`
   from the button reset. Forcing display on every <button> broke
   plugin buttons that use other display values (grid for FABs,
   block for full-width buttons). Now only enforces the touch
   target's minimum size — the display property is left alone.
   Also removed `.mna-btn` from the selector list: the plugin
   manages its own button display and spacing.
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    h1 { font-size: 28px !important; }
    h2 { font-size: 22px !important; }
    h3 { font-size: 18px !important; }

    button,
    a.button,
    input[type="submit"] {
        min-height: 44px;
    }
}

/* ═══════════════════════════════════════════════════════════
   23. UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   24. DARK MODE COMPATIBILITY NOTES
   ───────────────────────────────────────────────────────────
   Every color in this file now references a design token from
   :root at the top of this stylesheet. Those tokens, in turn,
   resolve to the parent theme's --nh-* CSS variables, which the
   parent's html.nh-dark and body.noteshub-dark-default rules
   swap at runtime. Result: nothing in this file needs a separate
   dark-mode override — the tokens do the work.

   The only exceptions are:
     - .noteshub-comment-awaiting-moderation (uses #f59e0b /
       #fffbeb — an amber warning panel, intentional in both
       modes; a dark variant is provided below).
     - The `.nh-post-thumb-placeholder` gradient, which uses the
       brand colors (correct on both light and dark).
   ═══════════════════════════════════════════════════════════ */

html.nh-dark .noteshub-comment-list .comment-awaiting-moderation,
html.nh-dark .noteshub-comments .comment-awaiting-moderation,
body.noteshub-dark-default .noteshub-comment-list .comment-awaiting-moderation,
body.noteshub-dark-default .noteshub-comments .comment-awaiting-moderation {
    background: rgba(245, 158, 11, .12) !important;
    border: 1px solid rgba(245, 158, 11, .3) !important;
    color: #fcd34d !important;
}

/* ═══════════════════════════════════════════════════════════
   25. WordPress Core Classes (Theme Check compliance)
   ───────────────────────────────────────────────────────────
   WordPress core emits these classes in its generated markup.
   All themes must style them. Tokens (--nhc-*) resolve to the
   parent theme's dark-mode-aware variables, so both classes
   automatically work in light and dark mode.
   ═══════════════════════════════════════════════════════════ */

/* ── .sticky — emitted on the sticky post's <article> ── */
.sticky {
    position: relative;
}

.sticky .noteshub-card-title::before,
.sticky .nh-post-title::before,
.sticky .noteshub-single-title::before {
    content: "📌 ";
    margin-right: 4px;
    font-size: .85em;
    vertical-align: middle;
    opacity: .85;
}

.sticky .noteshub-card,
.sticky .nh-post-card {
    border-color: var(--nhc-primary) !important;
    box-shadow: 0 4px 16px var(--nhc-primary-soft) !important;
}

/* ── .gallery-caption — emitted by the classic [gallery] shortcode ── */
.gallery-caption {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: var(--nhc-text-muted);
    padding: 8px 4px 0;
    margin: 0;
    text-align: center;
    font-style: italic;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    border-radius: var(--nhc-radius-sm);
}

/* ── .bypostauthor — expected by Theme Check; the visible
   "AUTHOR" badge is already drawn by the comments section
   above (rule at the end of section 19). No extra CSS is
   needed here — this comment documents that we knowingly
   style it via the section-19 rule. ── */