/*
 * NiftyTechFinds — 2026 design refresh (theme 2.4.0)
 *
 * Loaded after style.css. Retunes the design tokens from the old
 * skeuomorphic look (gloss, inset shadows, uppercase labels) to a flat,
 * editorial dark UI, and fixes layout issues found in the Oct 2026 audit.
 * Delete this file (and its enqueue in functions.php) to roll back.
 */

/* ---------- 1. Tokens ---------- */
:root {
    --ntf-bg: #090c13;
    --ntf-bg-light: #0c1019;
    --ntf-graphite: #121722;
    --ntf-graphite-light: #171d2a;
    --ntf-graphite-dark: #0b0f17;
    --ntf-slate: #222a3a;
    --ntf-slate-light: #2c3548;
    --ntf-silver: #b6bfcc;
    --ntf-chrome: #e6eaf0;
    --ntf-chrome-light: #f6f8fb;
    --ntf-muted: #9aa4b2;
    --ntf-body: #c9d0da;

    --ntf-cyan: #3ddcf5;
    --ntf-cyan-dark: #18c3e0;

    --ntf-surface-dark: #111622;
    --ntf-surface-glossy: none;
    --ntf-border: rgba(255, 255, 255, 0.08);
    --ntf-border-strong: rgba(255, 255, 255, 0.14);

    --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-raised-hover: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-inset: none;
    --shadow-button: none;
    --shadow-button-active: none;
    --shadow-card: none;
    --shadow-card-hover: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
    --shadow-metallic: none;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --ntf-header-height: 64px;
}

/* ---------- 2. Base ---------- */
body {
    background: var(--ntf-bg);
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
::selection { background: rgba(61, 220, 245, 0.3); color: #fff; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.02em; }
.ntf-glossy::before { display: none; }
.ntf-metallic { background: var(--ntf-surface-dark); }
.ntf-raised, .ntf-inset { border-color: var(--ntf-border); box-shadow: none; }

/* Inputs */
.ntf-input { box-shadow: none; border-color: var(--ntf-border-strong); border-radius: var(--radius-md); background: var(--ntf-graphite-dark); }
.ntf-input:focus { box-shadow: 0 0 0 3px rgba(61, 220, 245, 0.18); border-color: var(--ntf-cyan); }
.ntf-input::placeholder { color: var(--ntf-muted); opacity: 1; }

/* ---------- 3. Buttons & chips ---------- */
.ntf-btn {
    font-family: var(--font-primary);
    text-transform: none;
    letter-spacing: -0.005em;
    font-weight: 600;
    border-radius: 999px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ntf-btn::before { display: none; }
.ntf-btn-primary { background: var(--ntf-orange); color: #0b0f1a; }
.ntf-btn-primary:hover { background: #ff8f3d; color: #0b0f1a; box-shadow: 0 10px 24px -10px rgba(255, 122, 24, 0.7); }
.ntf-btn-secondary { background: transparent; border: 1px solid var(--ntf-border-strong); color: var(--ntf-chrome-light); }
.ntf-btn-secondary:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.26); color: #fff; }
.ntf-btn-accent { background: rgba(61, 220, 245, 0.12); color: var(--ntf-cyan); border: 1px solid rgba(61, 220, 245, 0.3); }
.ntf-btn-accent:hover { background: var(--ntf-cyan); color: #06121a; }
.ntf-btn:active { transform: translateY(1px); }

.ntf-chip {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    box-shadow: none;
    border-color: var(--ntf-border);
    background: rgba(255, 255, 255, 0.04);
}
.ntf-chip:hover { transform: none; background: rgba(255, 255, 255, 0.08); }
.ntf-chip-accent { background: rgba(61, 220, 245, 0.1); border-color: rgba(61, 220, 245, 0.28); color: var(--ntf-cyan); }
.ntf-chip-accent:hover { background: rgba(61, 220, 245, 0.18); color: #fff; }
.ntf-tag { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--ntf-border); border-radius: 999px; padding: 0.3rem 0.75rem; }
.ntf-tag:hover { border-color: rgba(61, 220, 245, 0.35); color: var(--ntf-cyan); background: rgba(61, 220, 245, 0.06); }

/* ---------- 4. Header ---------- */
.ntf-header {
    background: rgba(9, 12, 19, 0.78);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--ntf-border);
    box-shadow: none;
}
.ntf-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9); }
.ntf-header-inner { max-width: 1400px; margin: 0 auto; }
.ntf-logo-image { max-height: 34px; }
.ntf-nav-link { color: var(--ntf-silver); border-radius: 999px; padding: 0.45rem 0.85rem; }
.ntf-nav-link:hover { color: var(--ntf-chrome-light); background: rgba(255, 255, 255, 0.06); }
.ntf-nav-link.active { background: rgba(255, 255, 255, 0.08); color: var(--ntf-chrome-light); }
.ntf-header-action-btn, .ntf-menu-toggle { box-shadow: none; background: transparent; border-color: var(--ntf-border); border-radius: 999px; }
.ntf-header-action-btn:hover { box-shadow: none; }

/* Dropdowns: flat panel; long menus (e.g. Tools) split into two columns. */
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown {
    background: #121722;
    border: 1px solid var(--ntf-border-strong);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.85);
    list-style: none;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown .ntf-nav-link { border-radius: 8px; padding: 0.55rem 0.8rem; white-space: normal; line-height: 1.35; }
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown:has(> li:nth-child(7)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 2px;
    min-width: 470px;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children:last-child > .ntf-dropdown { left: auto; right: 0; }

/* Mobile menu */
.ntf-mobile-menu { background: rgba(9, 12, 19, 0.98); }
.ntf-mobile-menu .ntf-nav-link { border-radius: 0; padding: 0.9rem 0.25rem; font-size: 1.05rem; border-bottom-color: var(--ntf-border); }
.ntf-mobile-menu .menu-item-has-children { border-bottom-color: var(--ntf-border); }

/* Search overlay */
.ntf-search-overlay { background: rgba(9, 12, 19, 0.92); }
.ntf-search-overlay-inner .ntf-input { background: #121722; border: 1px solid var(--ntf-border-strong); border-radius: 16px; }
.ntf-search-close { border-radius: 999px; }

/* ---------- 5. Hero ---------- */
.ntf-hero { padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3.5rem); isolation: isolate; }
.ntf-hero-bg {
    background:
        radial-gradient(55% 60% at 12% 35%, rgba(61, 220, 245, 0.11), transparent 70%),
        radial-gradient(40% 45% at 88% 12%, rgba(255, 122, 24, 0.09), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        var(--ntf-bg);
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
    mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.ntf-hero-grid { gap: clamp(2rem, 5vw, 4rem); }
.ntf-hero-badge {
    background: rgba(61, 220, 245, 0.08);
    border-color: rgba(61, 220, 245, 0.22);
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
}
.ntf-hero-badge::before { width: 7px; height: 7px; animation: none; box-shadow: 0 0 0 4px rgba(61, 220, 245, 0.16); }
.ntf-hero-title {
    font-size: clamp(2.3rem, 5.2vw, 4.25rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
    background: linear-gradient(180deg, #ffffff 0%, #c4cfdc 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.ntf-hero-description { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--ntf-silver); max-width: 34rem; }
.ntf-hero-actions { gap: 0.75rem; }

/* Hero card: whole card is clickable (stretched title link). */
.ntf-hero-card {
    position: relative;
    background: var(--ntf-surface-dark);
    border: 1px solid var(--ntf-border-strong);
    border-radius: 22px;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(61, 220, 245, 0.04);
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.ntf-hero-card:hover { transform: translateY(-3px); border-color: rgba(61, 220, 245, 0.35); }
.ntf-hero-card-image { height: auto; aspect-ratio: 2 / 1; background: #0e131d; }
.ntf-hero-card-image img { transition: transform 0.6s ease; }
.ntf-hero-card:hover .ntf-hero-card-image img { transform: scale(1.03); }
.ntf-hero-card-overlay { background: linear-gradient(180deg, transparent 55%, rgba(17, 22, 34, 0.85) 100%); }
.ntf-hero-card-content { padding: 1.4rem 1.6rem 1.6rem; }
.ntf-hero-card-title { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; letter-spacing: -0.02em; }
.ntf-hero-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ntf-hero-card-excerpt { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Old animated divider (also removed from front-page.php). */
.ntf-divider-section { display: none; }

/* ---------- 6. Section headers ---------- */
.ntf-section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.ntf-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--ntf-border);
}
.ntf-section-title {
    justify-content: flex-start;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}
.ntf-section-title svg { color: var(--ntf-orange); }
.ntf-section-title-bar { display: none; }
.ntf-section-alt { background: var(--ntf-bg-light); border-block: 1px solid rgba(255, 255, 255, 0.04); }

/* Hero "Explore" button target clears the sticky header. */
#latest { display: block; scroll-margin-top: calc(var(--ntf-header-height) + 16px); }
html { scroll-padding-top: calc(var(--ntf-header-height) + 16px); }

/* ---------- 7. Category filter (now sits under the section heading) ---------- */
body .ntf-filter-section { position: relative; top: auto; z-index: 1; padding: 0; background: transparent; }
#ntf-section-1 .ntf-filter-section .ntf-container { padding: 0; max-width: none; }
body .ntf-filter-bar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0 1.5rem;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
body .ntf-filter-bar--pills .ntf-filter-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    font-family: var(--font-primary);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--ntf-border);
    border-radius: 999px;
    color: var(--ntf-silver);
    box-shadow: none;
}
body .ntf-filter-bar--pills .ntf-filter-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--ntf-border-strong); color: var(--ntf-chrome-light); }
body .ntf-filter-bar--pills .ntf-filter-btn--active,
body .ntf-filter-bar--pills .ntf-filter-btn--active:hover { background: var(--ntf-chrome-light); border-color: var(--ntf-chrome-light); color: #0b0f1a; box-shadow: none; }
body .ntf-filter-bar--pills .ntf-filter-btn svg { width: 14px; height: 14px; }

/* ---------- 8. Post cards ---------- */
.ntf-posts-grid, .ntf-grid { gap: clamp(1rem, 2vw, 1.5rem); }
body .ntf-post-card {
    background: var(--ntf-surface-dark);
    border: 1px solid var(--ntf-border);
    border-radius: var(--radius-lg);
    box-shadow: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
body .ntf-post-card:hover { transform: translateY(-3px); border-color: rgba(61, 220, 245, 0.35); box-shadow: var(--shadow-card-hover); }
.ntf-post-card-image { height: auto; aspect-ratio: 16 / 10; background: #0e131d; }
body .ntf-post-card:hover .ntf-post-card-image img { transform: scale(1.04); }
.ntf-post-card-category { top: 0.75rem; left: 0.75rem; font-size: 0.7rem; padding: 0.28rem 0.6rem; background: rgba(9, 12, 19, 0.86); border-color: rgba(61, 220, 245, 0.35); }
.ntf-post-card-content { padding: 1.1rem 1.25rem 1.2rem; }
.ntf-post-card-meta { gap: 0.4rem 0.9rem; font-size: 0.78rem; color: var(--ntf-muted); margin-bottom: 0.55rem; }
.ntf-post-card-meta svg { opacity: 0.7; }
.ntf-post-card-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--ntf-chrome-light);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}
.ntf-post-card:hover .ntf-post-card-title { color: var(--ntf-cyan); }
.ntf-post-card-excerpt {
    flex: 0 0 auto;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--ntf-silver);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ntf-post-card-footer { border-top-color: var(--ntf-border); padding-top: 0.85rem; }
.ntf-post-card-author { font-size: 0.8rem; }
.ntf-post-card-author img { width: 24px; height: 24px; border: 0; }
.ntf-post-card-read-more { font-size: 0.8rem; }
.ntf-post-card-list-content { padding: 1.25rem 1.25rem 1.25rem 0; }

/* Featured (large) card */
.ntf-featured-card { border-color: var(--ntf-border); box-shadow: none; transition: border-color 0.2s ease; }
.ntf-featured-card:hover { border-color: rgba(61, 220, 245, 0.35); box-shadow: var(--shadow-card-hover); }
.ntf-featured-card-badge { text-transform: none; font-size: 0.75rem; }
.ntf-featured-card-title { letter-spacing: -0.025em; }

/* ---------- 9. Trending (now ranked by views) ---------- */
.ntf-trending-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
.ntf-trending-card, .ntf-trending-card:last-child { border-bottom: 1px solid var(--ntf-border); }
.ntf-trending-card-link { padding: 1rem 0.25rem; gap: 1rem; border-radius: 0; }
.ntf-trending-card-link:hover { background: transparent; }
.ntf-trending-num {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 2.25rem;
    text-align: left;
    color: #7b8494;
    opacity: 1;
    font-variant-numeric: tabular-nums;
}
.ntf-trending-card:nth-child(-n+3) .ntf-trending-num,
.ntf-trending-card:hover .ntf-trending-num { color: var(--ntf-orange); }
.ntf-trending-card-title {
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ntf-trending-card-meta { color: var(--ntf-muted); font-size: 0.78rem; }
.ntf-trending-card-image { width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--ntf-border); }

/* ---------- 10. Quick links ---------- */
.ntf-quick-link-card { background: var(--ntf-surface-dark); border: 1px solid var(--ntf-border); border-radius: var(--radius-lg); }
.ntf-quick-link-card:hover { border-color: rgba(61, 220, 245, 0.35); }
.ntf-quick-link-icon { background: rgba(61, 220, 245, 0.1); box-shadow: none; border-radius: 12px; }
.ntf-quick-link-card:hover .ntf-quick-link-icon { box-shadow: none; transform: none; }

/* ---------- 11. Newsletter ---------- */
.ntf-subscribe {
    background:
        radial-gradient(80% 140% at 0% 0%, rgba(61, 220, 245, 0.13), transparent 60%),
        radial-gradient(60% 120% at 100% 100%, rgba(255, 122, 24, 0.11), transparent 60%),
        var(--ntf-surface-dark);
    border: 1px solid var(--ntf-border-strong);
    border-radius: 24px;
    box-shadow: none;
}
.ntf-subscribe-title { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.025em; }
/* MailPoet prints inline styles (white field, 20-24px Ubuntu text), so these
   overrides need !important to win. */
body .ntf-subscribe-form .mailpoet_text,
body .ntf-subscribe-form input[type="email"] {
    font-family: var(--font-primary) !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
    color: var(--ntf-chrome) !important;
    background: var(--ntf-graphite-dark) !important;
    border: 1px solid var(--ntf-border-strong) !important;
    border-radius: 999px !important;
    padding: 0.85rem 1.25rem !important;
    box-shadow: none !important;
}
body .ntf-subscribe-form input::placeholder { color: var(--ntf-muted) !important; }
body .ntf-subscribe-form .mailpoet_submit {
    font-family: var(--font-primary) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #0b0f1a !important;
    background: var(--ntf-orange) !important;
    border-radius: 999px !important;
    padding: 0.85rem 1.25rem !important;
    box-shadow: none !important;
}
body .ntf-subscribe-form .mailpoet_submit:hover { background: #ff8f3d !important; }

/* ---------- 12. Single post ---------- */
.ntf-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; pointer-events: none; }
.ntf-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ntf-cyan), var(--ntf-orange)); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
.admin-bar .ntf-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .ntf-progress { top: 46px; } }

.ntf-single-header { padding: clamp(1.75rem, 5vw, 3.25rem) 0 1.5rem; }
.ntf-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.5rem; margin: 0 0 1rem; padding: 0; font-size: 0.8125rem; color: var(--ntf-muted); }
.ntf-breadcrumb li { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.ntf-breadcrumb li + li::before { content: "/"; opacity: 0.45; }
.ntf-breadcrumb a { color: var(--ntf-silver); }
.ntf-breadcrumb a:hover { color: var(--ntf-cyan); }
.ntf-breadcrumb [aria-current] { max-width: 32ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ntf-single-title { font-size: clamp(1.85rem, 4.4vw, 3.1rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.ntf-single-meta { gap: 0.5rem 1.25rem; font-size: 0.875rem; color: var(--ntf-muted); }
.ntf-single-meta svg { opacity: 0.75; }
.ntf-single-meta-updated { color: var(--ntf-chrome); }
.ntf-author-avatar-sm { width: 32px; height: 32px; border: 0; }

.ntf-single-featured-image { margin: 0.5rem 0 0; border-radius: 0; box-shadow: none; overflow: visible; }
.ntf-single-featured-image .ntf-container { max-width: 1120px; }
.ntf-single-featured-image img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 20px; border: 1px solid var(--ntf-border); background: #0e131d; }

/* Comfortable reading measure on posts. */
.single-post .ntf-single-content { padding-top: 1.5rem; }
.single-post .ntf-single-content > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
.single-post .ntf-single-content > .alignwide { max-width: 64rem; }
.single-post .ntf-single-content > .alignfull { max-width: none; }
.ntf-single-content p, .ntf-single-content li { color: var(--ntf-body); }
.ntf-single-content p { font-size: 1.0625rem; line-height: 1.8; }
.ntf-single-content h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 2.75rem; letter-spacing: -0.025em; }
.ntf-single-content h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-top: 2rem; }
.ntf-single-content a {
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-color: rgba(61, 220, 245, 0.45);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.ntf-single-content a:hover { color: #fff; text-decoration-color: currentColor; }
.ntf-single-content img { box-shadow: none; border: 1px solid var(--ntf-border); border-radius: 14px; margin: 1.5rem 0 0.5rem; }
.ntf-single-content figcaption { font-size: 0.85rem; color: var(--ntf-muted); text-align: center; margin-top: 0.4rem; }
.ntf-single-content blockquote { background: rgba(61, 220, 245, 0.05); border-left: 3px solid var(--ntf-cyan); box-shadow: none; font-style: normal; border-radius: 0 14px 14px 0; }
.ntf-single-content blockquote p { font-size: 1.1rem; color: var(--ntf-chrome); }
pre { box-shadow: none; border: 1px solid var(--ntf-border); }
table { box-shadow: none; border: 1px solid var(--ntf-border); background: var(--ntf-surface-dark); }
th { text-transform: none; letter-spacing: 0; font-size: 0.9em; background: var(--ntf-graphite-light); }
th, td { border-bottom-color: var(--ntf-border); }
.ntf-single-content .wp-block-table { overflow-x: auto; }

/* Rank Math TOC + FAQ blocks inside posts */
.ntf-single-content .wp-block-rank-math-toc-block { background: var(--ntf-surface-dark); border: 1px solid var(--ntf-border); border-radius: 16px; padding: 1.25rem 1.5rem; margin-top: 1.75rem; margin-bottom: 2rem; }
.ntf-single-content .rank-math-toc-heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ntf-muted); margin: 0 0 0.75rem; }
.ntf-single-content .rank-math-toc-wrap ol { margin: 0; padding-left: 1.25rem; }
.ntf-single-content .rank-math-toc-wrap li { margin-bottom: 0.35rem; }
.ntf-single-content .rank-math-toc-wrap a { text-decoration: none; color: var(--ntf-silver); }
.ntf-single-content .rank-math-toc-wrap a:hover { color: var(--ntf-cyan); }
.ntf-single-content .rank-math-list-item { background: var(--ntf-surface-dark); border: 1px solid var(--ntf-border); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 0.75rem; }
.ntf-single-content .rank-math-question { font-size: 1.05rem; margin: 0 0 0.5rem; }
.ntf-single-content .rank-math-answer p { margin: 0; font-size: 1rem; }

/* Cards and panels around the article */
.ntf-toc, .ntf-author-box, .ntf-post-nav-item, .ntf-inline-links, .ntf-widget,
.ntf-sticky-sidebar, .ntf-sticky-tab-panel, .comment-respond, .ntf-comment-list .comment-body {
    border-color: var(--ntf-border);
    box-shadow: none;
}
.ntf-sticky-tab-nav { box-shadow: none; border: 1px solid var(--ntf-border); }
.ntf-sticky-tab-nav-btn--active { box-shadow: none; background: rgba(61, 220, 245, 0.1); }
.ntf-sticky-tab-panel-title, .ntf-sticky-tab-widget-title { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.ntf-toc--suppressed { display: none !important; }
.ntf-share-btn, .ntf-footer-social a, .ntf-author-box-social a { box-shadow: none; border: 1px solid var(--ntf-border); border-radius: 999px; background: transparent; }
.ntf-post-nav-label { text-transform: none; letter-spacing: 0; }
.ntf-author-box-avatar { box-shadow: none; border-color: var(--ntf-border-strong); }

/* ---------- 13. Archive & pagination ---------- */
.ntf-archive-header { background: radial-gradient(60% 100% at 50% 100%, rgba(61, 220, 245, 0.06), transparent 70%); border-bottom: 1px solid var(--ntf-border); }
.ntf-archive-title { letter-spacing: -0.03em; }
.ntf-archive-count { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--ntf-border); }
.ntf-pagination .page-numbers { background: transparent; border: 1px solid var(--ntf-border); border-radius: 999px; box-shadow: none; }
.ntf-pagination a.page-numbers:hover { background: rgba(255, 255, 255, 0.06); transform: none; }
.ntf-pagination .page-numbers.current { background: var(--ntf-chrome-light); border-color: var(--ntf-chrome-light); color: #0b0f1a; }
.ntf-pagination .page-numbers.dots { border: 0; }
.ntf-page-links a, .ntf-page-links > span { box-shadow: none; border: 1px solid var(--ntf-border); }

/* ---------- 14. Footer ---------- */
.ntf-footer { background: #070a10; border-top: 1px solid var(--ntf-border); padding-top: clamp(2.5rem, 5vw, 4rem); }
.ntf-footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); padding-bottom: 2.5rem; }
.ntf-footer-logo .ntf-logo-image { max-height: 32px; }
.ntf-footer-widget-title { font-family: var(--font-primary); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--ntf-muted); }
.ntf-footer-links a { color: var(--ntf-silver); }
.ntf-footer-links a:hover { color: var(--ntf-chrome-light); padding-left: 0; }
.ntf-footer-bottom { max-width: 1400px; margin: 0 auto; padding: 1.25rem var(--space-lg); border-top-color: var(--ntf-border); }
.ntf-footer-copyright { color: var(--ntf-muted); margin: 0; }

#scroll-top { background: rgba(23, 29, 42, 0.92); color: var(--ntf-chrome-light); border: 1px solid var(--ntf-border-strong); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.8); width: 44px; height: 44px; }
#scroll-top:hover { background: var(--ntf-cyan); color: #06121a; box-shadow: 0 12px 24px -12px rgba(61, 220, 245, 0.6); }

/* Softer reveal */
.ntf-js .ntf-fade-in { animation-duration: 0.45s; }

/* ---------- 15. Responsive ---------- */
@media (max-width: 1024px) {
    /* Show the top story on tablet/mobile too instead of a text-only hero. */
    body .ntf-hero-featured { display: block; }
    .ntf-hero-content { max-width: none; }
    .ntf-footer-grid { grid-template-columns: 1fr 1fr; }
    .ntf-footer-brand { grid-column: 1 / -1; max-width: 32rem; }
}
@media (min-width: 600px) and (max-width: 900px) {
    body .ntf-grid-2, body .ntf-grid-3, body .ntf-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    body .ntf-hero-actions { flex-direction: row; }
    body .ntf-hero-actions .ntf-btn { width: auto; flex: 1 1 0; padding: 0.8rem 1rem; font-size: 0.95rem; }
    .ntf-hero-card-content { padding: 1.1rem 1.2rem 1.25rem; }
    .ntf-trending-grid { grid-template-columns: 1fr; }
    body .ntf-trending-card-image { display: block; width: 56px; height: 56px; }
    body .ntf-trending-num { font-size: 1.25rem; min-width: 1.75rem; }
    body .ntf-filter-bar { margin-right: calc(-1 * var(--space-lg)); }
    body .ntf-single-meta { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .ntf-breadcrumb [aria-current] { display: none; }
    .ntf-single-featured-image .ntf-container { padding: 0; }
    .ntf-single-featured-image img { border-radius: 0; border-left: 0; border-right: 0; }
    body .ntf-footer-grid { grid-template-columns: 1fr 1fr; text-align: left; }
    body .ntf-footer-social { justify-content: flex-start; }
    body .ntf-footer-bottom { text-align: left; align-items: flex-start; }
    #scroll-top { right: 1rem; bottom: 1rem; }
}
@media (max-width: 480px) {
    body .ntf-filter-bar { margin-right: calc(-1 * var(--space-md)); }
    .ntf-subscribe { padding: 1.75rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ntf-hero-card:hover, body .ntf-post-card:hover { transform: none; }
}
