/**
 * Pinwebtools - Frontend Public Styles
 * Standalone edition: no WordPress dependencies
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* -- Tokens ---------------------------------------------------------------- */
:root {
    --ts-primary:     #f43f5e;
    --ts-accent:      #8b5cf6;
    --ts-bg:          #f8fafc;
    --ts-btn:         #f43f5e;
    --ts-secondary:   #64748B;
    --ts-text:        #2C2C2C;
    --ts-muted:       #64748B;
    --ts-border:      #e2e8f0;
    --ts-white:       #FFFFFF;

    /* RGB fallbacks - fix AI tools using rgba(var(--ts-primary-rgb), 0.9) hover pattern */
    --ts-primary-rgb:    244, 63, 94;
    --ts-accent-rgb:     139, 92, 246;
    --ts-bg-rgb:         248, 250, 252;
    --ts-text-rgb:       44, 44, 44;
    --ts-secondary-rgb:  100, 116, 139;
    --ts-white-rgb:      255, 255, 255;

    /* Named hover aliases - fix AI tools using --ts-primary-hover etc. */
    --ts-primary-hover:  #e11d48;
    --ts-primary-dark:   #be123c;
    --ts-btn-hover:      #e11d48;
    --ts-button-hover:   #e11d48;
    --ts-hover:          #f1f5f9;

    --ts-shadow:    0 10px 40px -10px rgba(0,0,0,.08), 0 4px 10px -5px rgba(0,0,0,.04);
    --ts-shadow-lg: 0 30px 60px -15px rgba(0,0,0,.12), 0 15px 25px -10px rgba(0,0,0,.06);
    --ts-radius:    20px;
    --ts-font:      'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; height: 100%; }
body {
    font-family: var(--ts-font);
    background: var(--ts-bg);
    color: var(--ts-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }

/* Ensure no horizontal overflow by default and make media elements responsive */
/* overflow-x: clip (not hidden) — clip prevents scrollbar without creating a scroll container, so position:sticky still works */
html, body { max-width: 100%; overflow-x: clip; }
img, video, iframe, embed, object { max-width: 100%; height: auto; }

/* Responsive embed helper (use by wrapping iframes/videos) */
.ts-responsive-embed { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; }
.ts-responsive-embed iframe,
.ts-responsive-embed video,
.ts-responsive-embed embed,
.ts-responsive-embed object { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* -- Container ------------------------------------------------------------- */
.ts-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: clip;
}

/* -- Header ---------------------------------------------------------------- */
.ts-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
html.dark-mode .ts-header {
    background: rgba(15, 23, 42, 0.72) !important;
    border-bottom-color: rgba(51, 65, 85, 0.8) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
.ts-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 0;
}
.ts-site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--ts-text);
    flex-shrink: 0;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    /* Logo never takes more than it needs */
    max-width: 220px;
    min-width: 0;
    overflow: hidden;
}
.ts-site-logo:hover {
    opacity: 0.9;
    transform: translateY(-0.5px);
}
.ts-logo-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-accent) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ts-site-logo:hover .ts-logo-icon {
    transform: rotate(5deg) scale(1.05);
}
.ts-logo-name {
    letter-spacing: -0.5px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Desktop header search bar */
.ts-header-search {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    padding: 0 24px;
}
.ts-header-search form {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
}
.ts-header-search form i {
    position: absolute;
    left: 14px;
    color: var(--ts-text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.ts-header-search form input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border-radius: 50px;
    border: 1.5px solid var(--ts-border);
    background: var(--ts-bg);
    color: var(--ts-text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}
html.dark-mode .ts-header-search form input {
    background: rgba(255,255,255,0.05) !important;
    border-color: var(--ts-border) !important;
    color: var(--ts-text) !important;
}
.ts-header-search form input:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 3px rgba(var(--ts-primary-rgb), 0.12);
    background: var(--ts-surface);
}
.ts-header-search form input::placeholder {
    color: var(--ts-text-muted);
}
/* Nav collapse — sits between search and utils */
.ts-header-collapse {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0;
}
/* Right section: utils + hamburger — never shrinks or overflows */
.ts-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.ts-header-nav {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}
.ts-header-nav a {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--ts-text-muted);
    padding: 10px 4px;
    position: relative;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ts-header-nav a:hover,
.ts-header-nav a.active {
    color: var(--ts-primary);
}
.ts-header-nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ts-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ts-header-nav a:hover::after,
.ts-header-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.ts-btn-submit-tool {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-accent) 100%) !important;
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    box-shadow: 0 8px 20px rgba(var(--ts-primary-rgb), 0.3) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}
.ts-btn-submit-tool::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}
.ts-btn-submit-tool:hover::before {
    left: 100%;
}
.ts-btn-submit-tool::after {
    display: none !important;
}
.ts-btn-submit-tool:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px rgba(var(--ts-primary-rgb), 0.4) !important;
}
html.dark-mode .ts-btn-submit-tool:hover {
    box-shadow: 0 12px 25px rgba(var(--ts-primary-rgb), 0.6) !important;
}

.ts-header-utils {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1.5px solid var(--ts-border);
    flex-shrink: 0;
    white-space: nowrap;
}
#ts-mobile-menu-btn {
    display: none;
}
.ts-mobile-lang-wrap {
    display: none;
}
.ts-lang-wrap {
    position: relative;
}
.ts-utility-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--ts-border);
    color: var(--ts-text-muted);
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
html.dark-mode .ts-utility-btn {
    background: rgba(255, 255, 255, 0.03);
}
.ts-utility-btn:hover {
    background: var(--ts-surface-2);
    border-color: var(--ts-primary);
    color: var(--ts-primary);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.ts-utility-btn i {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}
.ts-utility-btn:hover i {
    transform: translateY(0.5px);
}
.ts-dark-toggle {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    font-size: 1.1rem;
}
.ts-dark-toggle i {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ts-dark-toggle:hover i {
    transform: rotate(20deg) scale(1.1);
}

.ts-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--ts-surface);
    border: 1px solid var(--ts-border);
    border-radius: 14px;
    overflow: hidden;
    z-index: 1000;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    animation: tsSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
html.dark-mode .ts-dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.ts-dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: var(--ts-text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.ts-dropdown-menu a:hover,
.ts-dropdown-menu a.active {
    background: var(--ts-surface-2);
    color: var(--ts-primary);
}
.ts-dropdown-menu a.active {
    background: rgba(239, 68, 68, 0.08);
}

/* -- Expanding Search Overlay (Desktop) ------------------------------------ */
.ts-search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--ts-surface);
    padding: 16px 24px;
    border-bottom: 1px solid var(--ts-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    z-index: 9990;
    animation: tsSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
html.dark-mode .ts-search-overlay {
    background: var(--ts-surface) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.ts-search-overlay-inner {
    max-width: 800px;
    margin: 0 auto;
}
.ts-search-form {
    position: relative;
    width: 100%;
}
.ts-search-form i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ts-text-muted);
    font-size: 1.1rem;
}
.ts-search-form input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border-radius: 14px;
    border: 2px solid var(--ts-border);
    background: var(--ts-bg);
    color: var(--ts-text);
    font-family: inherit;
    font-size: 1.05rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.ts-search-form input:focus {
    border-color: var(--ts-primary);
    background: var(--ts-surface);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
#ts-search-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ts-text-muted);
    cursor: pointer;
    font-size: 1.4rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}
#ts-search-close:hover {
    color: var(--ts-primary);
    background: rgba(0, 0, 0, 0.05);
}
html.dark-mode #ts-search-close:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* -- Archive Page ---------------------------------------------------------- */
.ts-archive-page { padding: 16px 0 20px; }

.ts-archive-hero {
    text-align: center;
    margin-bottom: 48px;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(var(--ts-primary-rgb), 0.04) 0%, rgba(var(--ts-accent-rgb), 0.06) 100%), var(--ts-white);
    border: 1px solid rgba(var(--ts-primary-rgb), 0.12);
    border-radius: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}
.ts-archive-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ts-text);
    margin-bottom: 12px;
}
.ts-archive-hero p {
    font-size: 1.1rem;
    color: var(--ts-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* -- Category Tabs & Scroll ------------------------------------------------ */
.ts-category-scroll {
    position: relative;
    margin-bottom: 40px;
    padding: 2px 0;
}
.ts-category-scroll::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--ts-bg));
    pointer-events: none;
    z-index: 2;
}
.ts-cat-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.ts-cat-tabs::-webkit-scrollbar { 
    display: block; 
    height: 4px;
}
.ts-cat-tabs::-webkit-scrollbar-track {
    background: transparent;
}
.ts-cat-tabs::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
.ts-cat-tab {
    white-space: nowrap;
    padding: 10px 24px;
    border-radius: 50px;
    border: 1.5px solid var(--ts-border);
    font-size: .95rem;
    font-weight: 700;
    color: var(--ts-muted);
    background: var(--ts-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.ts-cat-tab:hover {
    border-color: var(--ts-primary);
    color: var(--ts-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}
.ts-cat-tab.active {
    background: var(--ts-primary);
    border-color: var(--ts-primary);
    color: #fff;
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.3);
}

/* -- Tools Grid ------------------------------------------------------------ */
.ts-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.ts-tool-card {
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid var(--ts-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    text-decoration: none;
}

.ts-tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--ts-primary);
    box-shadow: 0 16px 32px -8px rgba(var(--ts-primary-rgb), 0.25);
}

.ts-tool-icon {
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
    background: var(--icon-bg, rgba(var(--ts-primary-rgb), 0.08));
    border: 2px solid var(--icon-border, rgba(var(--ts-primary-rgb), 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    color: var(--icon-color, var(--ts-primary));
    font-size: 20px;
    transition: all 0.3s ease;
}

.ts-tool-card:hover .ts-tool-icon {
    background: var(--icon-color, var(--ts-primary));
    color: #ffffff;
    border-color: var(--icon-color, var(--ts-primary));
    transform: scale(1.08) rotate(5deg);
}

.ts-tool-card h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ts-text);
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.ts-tool-card p {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ts-muted);
    line-height: 1.5;
    margin-bottom: 6px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bold, Colorful Open Button — #3 fix: solid background at rest */
.ts-tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background-color: var(--ts-primary);
    color: #ffffff !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    transition: background-color 0.2s ease;
    text-decoration: none;
    border: none;
}

.ts-tool-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.ts-tool-card:hover .ts-tool-link {
    background-color: var(--ts-primary-hover, #e11d48);
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(var(--ts-primary-rgb), 0.3);
}

.ts-tool-card:hover .ts-tool-link i {
    transform: translateX(6px);
}

html.dark-mode .ts-tool-card {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
html.dark-mode .ts-tool-card:hover {
    border-color: var(--ts-primary);
    box-shadow: 0 16px 32px -8px rgba(var(--ts-primary-rgb), 0.4);
}
html.dark-mode .ts-tool-icon { 
    background: rgba(var(--ts-primary-rgb), 0.15); 
    border-color: rgba(var(--ts-primary-rgb), 0.3); 
}
html.dark-mode .ts-tool-card h3 { color: #f8fafc; }
html.dark-mode .ts-tool-card p { color: #cbd5e1; }
html.dark-mode .ts-tool-link { 
    background: rgba(var(--ts-primary-rgb), 0.2); 
    color: var(--ts-primary); 
}
html.dark-mode .ts-tool-card:hover .ts-tool-icon,
html.dark-mode .ts-tool-card:hover .ts-tool-link {
    background: var(--ts-primary);
    color: #ffffff;
}

/* -- Empty State ----------------------------------------------------------- */
.ts-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--ts-muted);
}
.ts-empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: .4; }
.ts-empty-state h2 { font-size: 1.5rem; margin-bottom: 8px; color: var(--ts-text); }

/* -- Single Tool Page ------------------------------------------------------ */
.ts-single-page { padding: 40px 0 20px; }

/* Desktop: Left Ad + Main Content + Right Ad */
.ts-single-layout {
    display: grid;
    /* Default: main content only */
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}
/* If ONLY Right Ad Sidebar exists */
.ts-single-layout.layout-2col-right {
    grid-template-columns: minmax(0, 1fr) 300px;
}
/* If ONLY Left Ad Sidebar exists */
.ts-single-layout.layout-2col-left {
    grid-template-columns: 300px minmax(0, 1fr);
}
/* If BOTH Ad Sidebars exist */
.ts-single-layout.layout-3col {
    grid-template-columns: 300px minmax(0, 1fr) 300px;
}

/* Ensure ad images/iframes don't overflow sidebar */
.ts-ad-slot img,
.ts-ad-slot iframe,
.ts-ad-slot ins {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

/* Left Sidebar Navigation */
.ts-single-left-nav {
    position: sticky;
    top: 90px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--ts-border);
    border-radius: 12px;
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.ts-single-left-nav::-webkit-scrollbar {
    width: 4px;
}
.ts-single-left-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.ts-nav-cat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ts-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 20px 8px;
    margin-top: 8px;
}
.ts-nav-cat-label:first-child {
    margin-top: 0;
}
.ts-nav-tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--ts-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.ts-nav-tool-item:hover {
    background: rgba(139, 92, 246, 0.05);
    color: var(--ts-primary);
}
.ts-nav-tool-item.active {
    background: rgba(139, 92, 246, 0.08);
    color: var(--ts-primary);
    font-weight: 600;
    border-left-color: var(--ts-primary);
}
.ts-nav-tool-item i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
    color: #94a3b8;
    transition: color 0.2s ease;
}
.ts-nav-tool-item.active i, .ts-nav-tool-item:hover i {
    color: var(--ts-primary);
}

html.dark-mode .ts-single-left-nav {
    background: var(--ts-card-bg);
}


.ts-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--ts-muted);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.ts-breadcrumb a { color: var(--ts-primary); }
.ts-breadcrumb a:hover { text-decoration: underline; }
.ts-breadcrumb i { font-size: .65rem; }


/* Ensure tool page wrapper is responsive and doesn't overflow mobile */

.ts-single-main {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    width: 100%;
}

/* Fix hard-coded ad container widths that cause overflow on mobile */
.ad-container,
.ad-leaderboard,
.ts-ad-slot {
    max-width: 100% !important;
    overflow: hidden !important;
}

.ad-container > *,
.ad-leaderboard > *,
.ts-ad-slot > * {
    max-width: 100% !important;
    height: auto !important;
}

/* Constrain all inline advertisements */
ins.adsbygoogle {
    max-width: 100% !important;
    display: block !important;
}

.ts-tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ts-text);
    margin-bottom: 12px;
    text-align: center;
}
.ts-tool-short-desc {
    font-size: 1.05rem;
    color: var(--ts-muted);
    margin-bottom: 28px;
    text-align: center;
}

.ts-tool-box {
    background: var(--ts-white);
    border-radius: var(--ts-radius);
    border: 1px solid var(--ts-border);
    padding: 36px;
    margin-bottom: 12px;
    box-shadow: var(--ts-shadow);
    overflow: hidden;
    position: relative;
    min-height: 300px;
}
.ts-tool-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ts-primary), var(--ts-accent));
}

/* -- Platform Security Guarantee Bar (auto-injected on every tool) --------- */
.ts-security-bar {
    margin-bottom: 12px;
}
.ts-security-bar-inner {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10B981;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #065F46;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.5;
}
.ts-security-bar-inner i {
    color: #10B981;
    font-size: 1rem;
    margin-right: 6px;
}
.ts-security-bar-inner strong {
    color: #065F46;
    font-weight: 700;
}
/* Dark mode */
html.dark-mode .ts-security-bar-inner {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6EE7B7;
}
html.dark-mode .ts-security-bar-inner strong { color: #34D399; }

/* Suppress old inline security notices already baked into tool code */
/* so there is never a duplicate banner shown */
.ts-tool-box .ts-security-notice,
.ts-tool-box [class*="security-notice"] { display: none !important; }

/* -- Tool Buttons Global Override ------------------------------------------ */
/* Targets ALL action buttons inside tools to ensure a consistent black hover */
.ts-tool-box .btn:hover,
.ts-tool-box .btn-reset:hover,
.ts-tool-box .btn-secondary:hover,
.ts-tool-box .btn-calculate:hover,
.ts-tool-box button:hover,
.ts-tool-box button.btn:hover,
.ts-tool-box button.btn-reset:hover,
.ts-tool-box button.btn-secondary:hover,
.ts-tool-box button.btn-calculate:hover,
.ts-tool-box button[onclick*="calculate"]:hover,
.ts-tool-box button[onclick*="reset"]:hover,
.ts-tool-box button[onclick*="clear"]:hover,
.ts-tool-box button[id*="calculate"]:hover,
.ts-tool-box button[id*="reset"]:hover,
.ts-tool-box button[id*="clear"]:hover {
    background: #000000 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3) !important;
}

.ts-tool-full-desc {
    background: var(--ts-white);
    border-radius: var(--ts-radius);
    border: 1px solid rgba(var(--ts-primary-rgb), 0.08);
    padding: 40px;
    margin-top: 32px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ts-text);
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
    text-align: left;
    display: block;
    word-wrap: break-word;
}
.ts-tool-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    gap: 32px;
    align-items: start;
    margin-top: 32px;
}
.ts-tool-about-faq .ts-faq-component {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
@media (max-width: 1080px) {
    .ts-tool-about-grid {
        grid-template-columns: 1fr;
    }
}
.ts-tool-full-desc h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--ts-text);
    padding-bottom: 16px;
    border-bottom: 2px solid #F1F5F9;
    letter-spacing: -0.02em;
}
.ts-tool-full-desc h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--ts-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.ts-tool-full-desc h3::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: var(--ts-primary);
    border-radius: 4px;
}
.ts-tool-full-desc p {
    margin-bottom: 20px;
    color: #475569;
}
.ts-tool-full-desc ul, .ts-blog-content ul {
    margin-bottom: 24px;
    padding-left: 0;
    list-style: none;
}
.ts-tool-full-desc ol, .ts-blog-content ol {
    margin-bottom: 24px;
    padding-left: 0;
    list-style: none;
    counter-reset: ts-counter;
}
.ts-tool-full-desc li, .ts-blog-content li {
    margin-bottom: 12px;
    color: #475569;
    position: relative;
    padding-left: 28px;
    line-height: 1.6;
    display: block;
}
.ts-tool-full-desc ul li::before, .ts-blog-content ul li::before {
    content: '\f058';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--ts-primary);
    font-size: 1rem;
    position: absolute;
    left: 0;
    top: 2px;
}
.ts-tool-full-desc ol li, .ts-blog-content ol li {
    counter-increment: ts-counter;
}
.ts-tool-full-desc ol li::before, .ts-blog-content ol li::before {
    content: counter(ts-counter);
    background: var(--ts-primary);
    color: #fff;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    position: absolute;
    left: 0;
    top: 3px;
}
.ts-tool-full-desc strong, .ts-tool-full-desc b,
.ts-blog-content strong, .ts-blog-content b {
    font-weight: 700;
    color: var(--ts-primary);
}
.ts-tool-full-desc blockquote {
    border-left: 4px solid var(--ts-primary);
    padding: 20px 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--ts-secondary);
    background: #F8FAFC;
    border-radius: 0 12px 12px 0;
    font-size: 1.1rem;
}

/* -- Ad Slots -------------------------------------------------------------- */
.ts-ad-slot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
    margin: 0;
}

/* Clean "Advertisement" label above ad units */
.ad-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ts-muted, #94a3b8);
    margin: 0 0 6px;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

/* Ensure ad containers don't overflow */
.ad-container,
.ad-leaderboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
}


/* -- Sidebar --------------------------------------------------------------- */
/* Sidebar containers — sticky, aligned to top so they travel with scroll */
.ts-single-sidebar,
.ts-single-left-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: clip;
}
.ts-single-sidebar::-webkit-scrollbar,
.ts-single-left-sidebar::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Inner ad slot fills the sidebar */
.ts-single-left-sidebar .ts-ad-slot,
.ts-single-sidebar .ts-ad-slot {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.ts-sidebar-widget {
    background: var(--ts-white);
    border-radius: var(--ts-radius);
    border: 1.5px solid var(--ts-border);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ts-widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ts-text);
}
.ts-related-list { list-style: none; }
.ts-related-list li + li { margin-top: 4px; }
.ts-related-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--ts-text);
    transition: background .2s;
}
.ts-related-list a:hover { background: #F8FAFC; color: var(--ts-primary); }
.ts-rel-icon {
    width: 32px;
    height: 32px;
    background: #FFF5F5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--ts-primary);
    flex-shrink: 0;
}

/* -- Related Tools Section -------------------------------------------------- */
.ts-related-section {
    margin-top: 40px;
    padding: 40px 0 20px;
    border-top: 1px solid var(--ts-border);
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.02));
    border-radius: 40px 40px 0 0;
}
.ts-related-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}
.ts-related-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ts-text);
    display: flex;
    align-items: center;
    gap: 12px;
}
.ts-related-title i { color: var(--ts-primary); }
.ts-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.ts-related-card {
    background: var(--ts-white);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ts-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--ts-primary);
}
.ts-rel-icon-box {
    width: 48px;
    height: 48px;
    background: #FFF5F5;
    color: var(--ts-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s;
}
.ts-related-card:hover .ts-rel-icon-box {
    background: var(--ts-primary);
    color: #fff;
}
.ts-rel-name {
    font-weight: 700;
    color: var(--ts-text);
    font-size: 1.05rem;
    line-height: 1.3;
}
.ts-load-more-wrap {
    text-align: center;
    margin-top: 32px;
}
.ts-btn-load-more {
    background: #0f172a;
    color: #fff;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
}
.ts-btn-load-more:hover {
    background: var(--ts-primary);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(239, 68, 68, 0.4);
}

/* -- FAQ Section ---------------------------------------------------------- */
.ts-faq-page { padding: 80px 0 100px; background: var(--ts-bg); }
.ts-faq-container { max-width: 800px; margin: 0 auto; }
.ts-faq-header { text-align: center; margin-bottom: 60px; }
.ts-faq-header h1 { 
    font-size: clamp(2.5rem, 6vw, 3.5rem); 
    font-weight: 800; 
    letter-spacing: -0.03em; 
    margin-bottom: 16px; 
    color: var(--ts-text);
}
.ts-faq-header p { color: var(--ts-muted); font-size: 1.1rem; }

.ts-faq-list { display: flex; flex-direction: column; gap: 16px; }
.ts-faq-item {
    background: var(--ts-white);
    border: 1px solid var(--ts-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ts-faq-item:hover {
    border-color: var(--ts-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.ts-faq-question {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.ts-faq-question h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ts-text);
    margin: 0;
    transition: color 0.2s;
}
.ts-faq-icon {
    width: 32px;
    height: 32px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--ts-muted);
    transition: all 0.3s;
}
.ts-faq-item.active .ts-faq-icon {
    background: var(--ts-primary);
    color: #fff;
    transform: rotate(180deg);
}
.ts-faq-item.active .ts-faq-question h3 { color: var(--ts-primary); }

.ts-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.01);
}
.ts-faq-item.active .ts-faq-answer {
    max-height: 500px;
    padding-bottom: 32px;
}
.ts-faq-answer-inner {
    padding: 0 32px;
    color: var(--ts-muted);
    line-height: 1.8;
    font-size: 1rem;
}

/* -- Contact Page ---------------------------------------------------------- */
.ts-contact-page { padding: 80px 0 100px; }
.ts-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}
.ts-contact-info h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--ts-text);
}
.ts-contact-info p {
    font-size: 1.1rem;
    color: var(--ts-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.ts-info-cards { display: flex; flex-direction: column; gap: 24px; }
.ts-info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--ts-white);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--ts-border);
    transition: all 0.3s;
}
.ts-info-card:hover {
    transform: translateX(10px);
    border-color: var(--ts-primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}
.ts-info-icon {
    width: 56px;
    height: 56px;
    background: #FFF5F5;
    color: var(--ts-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.ts-info-content h4 { margin: 0; font-size: 0.9rem; color: var(--ts-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ts-info-content span { font-size: 1.1rem; font-weight: 700; color: var(--ts-text); }

.ts-contact-form-wrap {
    background: var(--ts-white);
    padding: 50px;
    border-radius: 32px;
    border: 1px solid var(--ts-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.ts-contact-form .ts-form-group { margin-bottom: 24px; }
.ts-contact-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--ts-text);
}
.ts-contact-form input, 
.ts-contact-form textarea {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}
.ts-contact-form input:focus, 
.ts-contact-form textarea:focus {
    border-color: var(--ts-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

@media (max-width: 900px) {
    .ts-contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .ts-contact-form-wrap { padding: 30px; }
}

/* -- About Page ------------------------------------------------------------ */
.ts-about-page { padding: 80px 0 100px; }
.ts-about-hero { text-align: center; margin-bottom: 80px; }
.ts-about-hero h1 {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ts-text);
    margin-bottom: 24px;
}
.ts-about-hero p {
    font-size: 1.25rem;
    color: var(--ts-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.ts-mission-box {
    background: #0F172A;
    color: #fff;
    padding: 80px 60px;
    border-radius: 40px;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
}
.ts-mission-box::before {
    content: '"';
    position: absolute;
    top: 20px; left: 40px;
    font-size: 10rem;
    font-family: serif;
    opacity: 0.1;
    color: var(--ts-primary);
}
.ts-mission-box h2 { font-size: 2rem; font-weight: 800; margin-bottom: 20px; color: #fff; }
.ts-mission-box p { font-size: 1.2rem; opacity: 0.8; max-width: 800px; margin: 0 auto; line-height: 1.8; }

.ts-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}
.ts-value-card {
    background: var(--ts-white);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--ts-border);
    transition: all 0.3s;
}
.ts-value-card:hover {
    transform: translateY(-8px);
    border-color: var(--ts-primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}
.ts-value-card i {
    font-size: 2.5rem;
    color: var(--ts-primary);
    margin-bottom: 24px;
    display: block;
}
.ts-value-card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 16px; color: var(--ts-text); }
.ts-value-card p { color: var(--ts-muted); line-height: 1.7; }

@media (max-width: 768px) {
    .ts-mission-box { padding: 40px 20px; }
    .ts-about-hero { margin-bottom: 40px; }
}

/* -- Header Search --------------------------------------------------------- */
.ts-header-search {
    flex: 1;
    max-width: 360px;
    margin: 0 16px;
}
.ts-search-input-wrap {
    position: relative;
    width: 100%;
}
.ts-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    pointer-events: none;
}
.ts-search-input-wrap input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 16px 10px 40px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.ts-search-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}
.ts-search-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Dark mode search input adjust */
html.dark-mode .ts-search-input-wrap input {
    background: rgba(15, 23, 42, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}



/* -- Footer ---------------------------------------------------------------- */
.ts-footer {
    border-top: 1px solid var(--ts-border);
    padding: 28px 0;
    text-align: center;
    font-size: .875rem;
    color: var(--ts-muted);
    background: var(--ts-white);
}

/* -- Responsive ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .ts-app-right-rail { display: none; }
    .ts-app-sidebar { width: 200px; min-width: 200px; }
}

@media (max-width: 768px) {
    .ts-app-shell { flex-direction: column; }
    .ts-app-sidebar { width: 100%; min-width: 100%; position: static; height: auto; border-right: none; border-bottom: 1px solid var(--ts-border); }
    .ts-app-sidebar-scroll { max-height: 200px; }
    .ts-app-content-area { flex-direction: column; }
}

@media (max-width: 1024px) {
    .ts-single-layout { grid-template-columns: 1fr !important; }
    .ts-single-sidebar,
    .ts-single-left-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .ts-single-container,
    .ts-single-main,
    .ts-tool-box,
    .ts-single-sidebar,
    .ts-single-left-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .ts-tool-box * {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .ts-tool-box input,
    .ts-tool-box select,
    .ts-tool-box textarea,
    .ts-tool-box button {
        width: 100% !important;
        max-width: 100% !important;
    }
    .ts-header-inner {
        padding: 12px 16px;
    }
}
@media (max-width: 1024px) {
    /* Header: keep flex, just adjust spacing and hide desktop search */
    .ts-header-inner {
        padding: 0 16px !important;
        height: 64px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Logo: auto-size, no overflow */
    .ts-site-logo {
        flex: 0 0 auto !important;
        max-width: 180px !important;
        font-size: 1rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }
    .ts-logo-name {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: block !important;
    }
    /* Right utilities: keep compact */
    .ts-header-right {
        margin-left: auto !important;
        gap: 8px !important;
        display: flex !important;
        align-items: center !important;
        background: transparent !important;
        position: static !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* Hide desktop search, show mobile search button instead */
    .ts-header-search { display: none !important; }
    #ts-mobile-search-btn { display: flex !important; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: transparent; border: none; flex-shrink: 0; color: var(--ts-text); font-size: 1.1rem; }

    /* Dark mode toggle on mobile */
    .ts-header-utils {
        border-left: none !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        gap: 0 !important;
    }

    /* â”€â”€ Mobile Menu Toggle Hamburger â”€â”€ */
    #ts-mobile-menu-btn {
        display: flex !important;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: transparent !important;
        border: none !important;
        color: var(--ts-text) !important;
        position: relative !important;
        z-index: 9999 !important;
        cursor: pointer !important;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    html.dark-mode #ts-mobile-menu-btn {
        background: rgba(255, 255, 255, 0.03) !important;
    }
    #ts-mobile-menu-btn:hover {
        border-color: var(--ts-primary) !important;
        color: var(--ts-primary) !important;
        background: var(--ts-surface-2) !important;
        transform: translateY(-0.5px);
    }

    /* â€”â€” Mobile Dropdown Drawer â€”â€” */
    .ts-header-collapse {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 20px 20px 24px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(226, 232, 240, 0.8);
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        border-radius: 0;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        animation: tsSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        box-sizing: border-box;
        z-index: 9990;
        overflow-y: auto;
        max-height: calc(100vh - 64px);
    }

/* Removed redundant 900px block */
    html.dark-mode .ts-header-collapse {
        background: rgba(26, 32, 56, 0.98) !important;
        border-color: rgba(46, 58, 92, 0.8) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    }
    html.dark-mode .ts-header-collapse .ts-header-nav a {
        color: #e2e8f0 !important;
    }
    html.dark-mode .ts-header-collapse .ts-header-nav a:hover,
    html.dark-mode .ts-header-collapse .ts-header-nav a.active {
        color: var(--ts-primary) !important;
        background: rgba(255,255,255,0.05);
    }

    .ts-header-collapse.active {
        display: flex;
    }

    /* â”€â”€ Mobile Drawer Search Wrap â”€â”€ */
    .ts-mobile-search-wrap {
        display: none;
        width: 100%;
        margin-bottom: 20px;
        box-sizing: border-box;
    }
    .ts-mobile-search-form {
        position: relative;
        width: 100%;
    }
    .ts-mobile-search-form i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--ts-text-muted);
        font-size: 0.95rem;
    }
    .ts-mobile-search-form input {
        width: 100%;
        padding: 12px 16px 12px 42px;
        border-radius: 12px;
        border: 1.5px solid var(--ts-border);
        background: var(--ts-surface-2);
        color: var(--ts-text);
        font-family: inherit;
        font-size: 0.95rem;
        outline: none;
        transition: all 0.25s ease;
        box-sizing: border-box;
    }
    .ts-mobile-search-form input:focus {
        border-color: var(--ts-primary);
        background: var(--ts-surface);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
    }

    /* â”€â”€ Mobile Navigation List â”€â”€ */
    .ts-header-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .ts-header-nav a {
        padding: 12px 16px;
        width: 100%;
        border-radius: 10px;
        border-bottom: none;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--ts-text) !important;
        display: block;
        box-sizing: border-box;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .ts-header-nav a::after {
        display: none !important;
    }
    .ts-header-nav a:hover,
    .ts-header-nav a.active {
        color: var(--ts-primary) !important;
        background: var(--ts-surface-2);
        padding-left: 20px;
    }

    /* â”€â”€ Mobile Submit Tool Button â”€â”€ */
    .ts-header-nav a.ts-btn-submit-tool {
        margin: 16px 0 0 0;
        text-align: center;
        padding: 12px 16px;
        font-size: 0.95rem;
        font-weight: 700 !important;
        display: block;
        box-sizing: border-box;
        border-radius: 12px;
        background: var(--ts-primary);
        color: #fff !important;
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
    }
    .ts-header-nav a.ts-btn-submit-tool:hover {
        padding-left: 16px;
        background: #000000 !important;
        color: #ffffff !important;
        transform: translateY(-1px);
    }
    html.dark-mode .ts-header-nav a.ts-btn-submit-tool:hover {
        background: #ffffff !important;
        color: #0f172a !important;
    }

    /* â”€â”€ Mobile Drawer Language Wrap â”€â”€ */
    .ts-mobile-lang-wrap {
        display: block;
        margin-top: 20px;
        padding-top: 16px;
        border-top: 1px solid var(--ts-border);
    }
    .ts-mobile-lang-title {
        display: block;
        font-size: 0.8rem;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--ts-text-muted);
        margin-bottom: 12px;
        letter-spacing: 0.05em;
    }
    .ts-mobile-lang-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .ts-mobile-lang-item {
        padding: 8px 14px;
        border-radius: 30px;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--ts-text);
        background: var(--ts-surface-2);
        border: 1.5px solid var(--ts-border);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .ts-mobile-lang-item:hover {
        border-color: var(--ts-primary);
        color: var(--ts-primary);
        background: var(--ts-surface);
    }
    .ts-mobile-lang-item.active {
        background: rgba(239, 68, 68, 0.08);
        border-color: var(--ts-primary);
        color: var(--ts-primary);
    }

    /* â”€â”€ Extremely small viewports compact logo name â”€â”€ */
    @media (max-width: 375px) {
        .ts-logo-name {
            font-size: 1rem !important;
            max-width: calc(100vw - 180px) !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
}
@keyframes tsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 768px) {
    .ts-tools-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .ts-archive-page { padding: 40px 0 60px; }
    .ts-tool-card { padding: 16px; }
    .ts-container { padding: 0 16px; }
    .ts-tool-box { padding: 20px; }
    .ts-tool-full-desc { padding: 20px; }
}
@media (max-width: 600px) {
    .ts-tools-grid { grid-template-columns: 1fr !important; }
}

/* -- Blog two-column layout -- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    align-items: start;
}
.blog-content {
    min-width: 0;
    text-align: left;
}
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content p,
.blog-content ul,
.blog-content ol,
.blog-content blockquote,
.blog-content figure {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}
.blog-sidebar {
    min-width: 0;
    position: sticky;
    top: 24px;
}
/* Sidebar widgets */
.sidebar-widget {
    background: #ffffff;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 24px;
}
.widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a1a2e;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #f0f0f5;
}
.sidebar-post-list,
.sidebar-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-post-list a,
.sidebar-cat-list a {
    font-size: 0.875rem;
    color: #2c2c4a;
    text-decoration: none;
    line-height: 1.45;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.15s;
}
.sidebar-post-list a:hover,
.sidebar-cat-list a:hover { color: #4f46e5; }
.cat-count {
    font-size: 0.75rem;
    color: #888;
    flex-shrink: 0;
}
/* Responsive - stack to single column on mobile */
@media (max-width: 899px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 24px 16px;
    }
    .blog-sidebar {
        position: static;
    }
    /* On mobile, show the inline TOC above content and hide the sidebar one */
    .toc-mobile-only {
        display: block;
    }
    .toc-sidebar {
        display: none;
    }
}

/* Professional Frontend Alert Modal */
.ts-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: tsFadeIn 0.2s ease;
}
.ts-alert-card {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ts-alert-overlay.active { display: flex; }
.ts-alert-overlay.active .ts-alert-card { transform: scale(1); }

.ts-alert-icon {
    width: 60px;
    height: 60px;
    background: #FEF2F2;
    color: #EF4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}
.ts-alert-title { font-size: 1.25rem; font-weight: 800; color: #1E293B; margin-bottom: 8px; }
.ts-alert-text { color: #64748B; margin-bottom: 24px; font-size: 0.95rem; line-height: 1.5; }
.ts-alert-btn {
    width: 100%;
    padding: 12px;
    background: var(--ts-primary);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.ts-alert-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* -- Blog/Post Specific Classes -- */
.ts-post-title { font-size: 2.5rem; margin-bottom: 12px; color: var(--ts-text); text-align: left; line-height: 1.2; }
@media (max-width: 768px) {
    .ts-post-title { font-size: 1.6rem; }
    .ts-post-content h1, .blog-content h1 { font-size: 1.4rem !important; }
    .ts-post-content h2, .blog-content h2 { font-size: 1.25rem !important; }
    .ts-post-content h3, .blog-content h3 { font-size: 1.15rem !important; }
    .ts-post-content h4, .blog-content h4 { font-size: 1.05rem !important; }
    .ts-post-content h5, .blog-content h5 { font-size: 1rem !important; }
    .ts-tool-full-desc { 
        padding: 24px !important; 
        margin-top: 24px !important; 
        word-wrap: break-word; 
        overflow-wrap: break-word; 
    }
    .ts-post-content {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        text-align: justify;
        line-height: 1.8;
    }
    html.dark-mode .ts-post-content {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    .ts-post-content img, .blog-content img { max-width: 100% !important; height: auto !important; }
}
.ts-badge { padding: 4px 10px; border-radius: 99px; vertical-align: middle; margin-left: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: 0.05em; font-size: 0.35em; }
.ts-badge-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.ts-post-meta-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; margin-bottom: 24px; border-bottom: 1px solid var(--ts-border); border-top: 1px solid var(--ts-border); }
.ts-author-info { display: flex; align-items: center; gap: 12px; }
.ts-author-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ts-border); }
.ts-author-name { font-weight: 700; color: var(--ts-text); font-size: 1rem; }
.ts-post-date { color: var(--ts-muted); font-size: 0.85rem; }

/* Related Posts Section */
.ts-related-posts-section { margin-top: 48px; border-top: 1px solid var(--ts-border); padding-top: 32px; }
.ts-related-posts-title {
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ts-text);
}

.ts-share-buttons { display: flex; align-items: center; gap: 8px; }
.ts-share-label { font-size: 0.85rem; color: var(--ts-muted); font-weight: 600; margin-right: 8px; text-transform: uppercase; }
.ts-share-btn { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: transform 0.2s; }
.ts-share-btn:hover { transform: scale(1.1); }
.ts-share-btn.whatsapp { background: #25D366; }
.ts-share-btn.telegram { background: #0088cc; }
.ts-share-btn.facebook { background: #1877F2; }
.ts-share-btn.twitter { background: #1DA1F2; }
.ts-share-btn.linkedin { background: #0A66C2; }

.ts-feature-image-wrap { margin-bottom: 30px; }
.ts-feature-image { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }

.ts-author-box { margin-top: 50px; padding: 24px; background: var(--ts-white); border: 1px solid var(--ts-border); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.ts-author-avatar-large { border-radius: 50%; width: 80px; height: 80px; object-fit: cover; }
.ts-author-title { margin: 0 0 8px; font-size: 1.1rem; color: var(--ts-text); }
.ts-author-bio { margin: 0; color: var(--ts-muted); font-size: 0.95rem; line-height: 1.6; }

.ts-related-posts-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--ts-border); }
#related-posts-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
}
@media (max-width: 1024px) { #related-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { #related-posts-grid { grid-template-columns: 1fr; } }

.ts-related-post-card { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    border: 1px solid var(--ts-border); 
    border-radius: 12px; 
    background: var(--ts-white); 
    text-decoration: none; 
    transition: all 0.3s ease; 
    overflow: hidden; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.ts-related-post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--ts-primary); }
.ts-related-post-img { height: 160px; width: 100%; object-fit: cover; }
.ts-related-post-img.fallback { background: var(--ts-bg); display: flex; align-items: center; justify-content: center; color: var(--ts-muted); font-size: 1.5rem; }
.ts-related-post-body { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.ts-related-post-title { font-weight: 700; color: var(--ts-text); font-size: 1rem; line-height: 1.4; margin-bottom: 12px; }
.ts-related-post-date { color: var(--ts-muted); font-size: 0.8rem; font-weight: 500; }

@keyframes tsFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* -- Category Cards -------------------------------------------------------- */
.ts-category-card {
    background: var(--ts-white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--ts-border);
}
.ts-category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ts-shadow-lg);
    border-color: var(--ts-primary);
}
.ts-category-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--ts-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.ts-category-card-body {
    flex: 1;
}
.ts-category-card-body h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ts-text);
    margin: 0 0 8px;
}
.ts-category-card-body p {
    color: var(--ts-secondary);
    font-size: 0.95rem;
    margin: 0 0 12px;
    line-height: 1.5;
}
.ts-category-card-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ts-primary);
    background: rgba(239, 68, 68, 0.1);
    padding: 4px 10px;
    border-radius: 99px;
    display: inline-block;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DARK MODE - comprehensive overrides
   Applied via: html.dark-mode  (set by localStorage JS)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

html.dark-mode {
    color-scheme: dark;
    --ts-bg:        #0f172a;
    --ts-text:      #e2e8f0;
    --ts-muted:     #94a3b8;
    --ts-border:    #334155;
    --ts-white:     #1e293b;
    --ts-surface-2: #162032;
    --ts-secondary: #94a3b8;

    --ts-primary-hover: #DC2626;
    --ts-primary-dark:  #B91C1C;
    --ts-btn-hover:     #DC2626;
    --ts-button-hover:  #DC2626;
    --ts-hover:         #334155;
}

/* Body & base */
html.dark-mode body          { background: #0f172a; color: #e2e8f0; }
html.dark-mode p             { color: #cbd5e1; }
html.dark-mode li            { color: #cbd5e1; }
html.dark-mode span          { color: inherit; }
html.dark-mode label         { color: #e2e8f0; }
html.dark-mode small         { color: #94a3b8; }
html.dark-mode strong, 
html.dark-mode b             { color: var(--ts-primary); }

/* Headings */
html.dark-mode h1,html.dark-mode h2,
html.dark-mode h3,html.dark-mode h4,
html.dark-mode h5,html.dark-mode h6 { color: #f8fafc; }

/* Tool cards & Content */
html.dark-mode .ts-tool-card               { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-tool-card h3           { color: #f1f5f9; }
html.dark-mode .ts-tool-card p            { color: #94a3b8; }
html.dark-mode .ts-tool-icon              { background: rgba(239,68,68,0.1); }

html.dark-mode .ts-tool-full-desc         { background: #1e293b; border-color: #334155; box-shadow: none; color: #e2e8f0; }
html.dark-mode .ts-tool-full-desc h2,
html.dark-mode .ts-tool-full-desc h3      { color: #f8fafc; border-bottom-color: #334155; }
html.dark-mode .ts-tool-full-desc p,
html.dark-mode .ts-tool-full-desc li      { color: #cbd5e1; }
html.dark-mode .ts-tool-full-desc blockquote { background: #0f172a; border-left-color: var(--ts-primary); color: #94a3b8; }

/* Archive/hero */
html.dark-mode .ts-archive-hero h1        { color: #f8fafc; }
html.dark-mode .ts-archive-hero p         { color: #94a3b8; }

/* Category tabs */
/* Admin Edit Bar */
.ts-admin-edit-bar { background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid rgba(239,68,68,0.3); border-radius: 12px; margin-bottom: 24px; padding: 12px 20px; }
.ts-admin-edit-bar-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ts-admin-edit-label { color: var(--ts-primary); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.05em; display: flex; align-items: center; gap: 6px; }
.ts-admin-edit-info { color: #94a3b8; font-size: 0.9rem; flex: 1; }
.ts-admin-edit-info strong { color: #f8fafc; }
.ts-admin-edit-btn { background: var(--ts-primary); color: #fff !important; padding: 6px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 700; transition: all 0.2s; }
.ts-admin-edit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); opacity: 0.9; }

@media (max-width: 768px) {
    .ts-admin-edit-bar { padding: 15px; }
    .ts-admin-edit-info { width: 100%; order: 3; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; margin-top: 5px; }
    .ts-admin-edit-label { flex: 1; }
}

/* FAQ Component */
.ts-faq-component { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--ts-border); }
.ts-faq-head { margin-bottom: 40px; text-align: center; }
.ts-faq-component .ts-faq-comp-title { font-size: 1.35rem !important; font-weight: 800; color: var(--ts-text); margin-bottom: 8px; }
.ts-faq-comp-subtitle { color: var(--ts-muted); }

@media (max-width: 768px) {
    .ts-faq-component { margin-top: 32px; padding-top: 8px; }
    .ts-faq-head { margin-bottom: 25px; }
    .ts-faq-component .ts-faq-comp-title { font-size: 1.3rem !important; }
    .ts-faq-comp-subtitle { font-size: 0.9rem; }
}

/* Breadcrumb Mobile */
@media (max-width: 768px) {
    .ts-breadcrumb { font-size: 0.8rem; overflow-x: auto; white-space: nowrap; padding-bottom: 5px; margin-bottom: 20px; }
    .ts-breadcrumb i { font-size: 0.6rem; }
}

/* Single Page Container */
@media (max-width: 768px) {
    .ts-single-container { padding: 0 16px; }
}

/* Related section */
html.dark-mode .ts-related-card           { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-rel-name               { color: #e2e8f0; }
html.dark-mode .ts-rel-icon-box           { background: rgba(239,68,68,0.1); }

/* FAQ */
html.dark-mode .ts-faq-item               { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-faq-question h3        { color: #f1f5f9; }
html.dark-mode .ts-faq-icon               { background: #334155; color: #94a3b8; }
html.dark-mode .ts-faq-answer             { background: rgba(255,255,255,0.02); }
html.dark-mode .ts-faq-answer-inner       { color: #94a3b8; }

/* Contact */
html.dark-mode .ts-info-card              { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-info-content h4        { color: #94a3b8; }
html.dark-mode .ts-info-content span      { color: #f1f5f9; }
html.dark-mode .ts-contact-form-wrap      { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-contact-form label     { color: #e2e8f0; }
html.dark-mode .ts-contact-form input,
html.dark-mode .ts-contact-form textarea  { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html.dark-mode .ts-contact-info h1        { color: #f8fafc; }
html.dark-mode .ts-contact-info p         { color: #94a3b8; }

/* Archive Hero */
html.dark-mode .ts-archive-hero h1          { color: #f8fafc; }
html.dark-mode .ts-archive-hero p           { color: #94a3b8; }

/* About */
html.dark-mode .ts-about-hero h1          { color: #f8fafc; }
html.dark-mode .ts-about-hero p           { color: #94a3b8; }
html.dark-mode .ts-value-card             { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-value-card h3          { color: #f8fafc; }
html.dark-mode .ts-value-card p           { color: #94a3b8; }

/* Blog layout */
html.dark-mode .ts-blog-content           { color: #e2e8f0; }
html.dark-mode .ts-blog-content h1,
html.dark-mode .ts-blog-content h2,
html.dark-mode .ts-blog-content h3        { color: #f8fafc; }
html.dark-mode .ts-blog-content p,
html.dark-mode .ts-blog-content li        { color: #cbd5e1; }
html.dark-mode .ts-blog-content blockquote { background: #0f172a; border-left-color: var(--ts-primary); color: #94a3b8; }
html.dark-mode .ts-sidebar-widget         { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-widget-title           { color: #f1f5f9; border-color: #334155; }
html.dark-mode .ts-sidebar-post-list a,
html.dark-mode .ts-sidebar-cat-list a     { color: #cbd5e1; }

/* Alert modal */
html.dark-mode .ts-alert-card             { background: #1e293b; }
html.dark-mode .ts-alert-title            { color: #f8fafc; }
html.dark-mode .ts-alert-text             { color: #94a3b8; }

/* Inputs globally */
html.dark-mode input[type="text"],
html.dark-mode input[type="email"],
html.dark-mode input[type="url"],
html.dark-mode input[type="password"],
html.dark-mode input[type="search"],
html.dark-mode textarea,
html.dark-mode select                     { background: #0f172a; border-color: #334155; color: #e2e8f0; }



/* -- Universal Button Hover Safety Net (inside tool boxes) -------------------
   Ensures hover is always visible regardless of what pattern the AI generates.
   This runs in BOTH light and dark mode since tool boxes stay in light mode. */
.ts-tool-box button:hover,
.ts-tool-box [class*="btn"]:hover,
.ts-tool-box [class*="button"]:hover {
    opacity: 0.88;
    filter: brightness(0.9);
    transition: opacity 0.2s, filter 0.2s, background-color 0.2s, transform 0.2s;
}
/* But don't apply the filter fallback if the element already has a proper hover
   defined - CSS specificity means explicitly scoped :hover rules still win */


/* Inline style overrides - cover hardcoded colors in PHP templates */
html.dark-mode [style*="color:#1e293b"],
html.dark-mode [style*="color: #1e293b"],
html.dark-mode [style*="color:#0f172a"],
html.dark-mode [style*="color: #0f172a"],
html.dark-mode [style*="color:#374151"],
html.dark-mode [style*="color: #374151"] { color: #e2e8f0 !important; }

html.dark-mode [style*="color:#64748b"],
html.dark-mode [style*="color: #64748b"],
html.dark-mode [style*="color:#94a3b8"],
html.dark-mode [style*="color: #94a3b8"],
html.dark-mode [style*="color:#475569"],
html.dark-mode [style*="color: #475569"] { color: #94a3b8 !important; }

/* White/light backgrounds â†’ dark surface */
html.dark-mode .ts-card,
html.dark-mode .ts-widget,
html.dark-mode .ts-archive-hero,
html.dark-mode .ts-footer,
html.dark-mode .ts-container [style*="background:#fff"],
html.dark-mode .ts-container [style*="background: #fff"],
html.dark-mode [style*="background:#fff"],
html.dark-mode [style*="background: #fff"],
html.dark-mode [style*="background:#ffffff"],
html.dark-mode [style*="background: #ffffff"],
html.dark-mode [style*="background: #fff;"],
html.dark-mode [style*="background:#f8fafc"],
html.dark-mode [style*="background: #f8fafc"],
html.dark-mode [style*="background:#f1f5f9"],
html.dark-mode [style*="background: #f1f5f9"] { background: #1e293b !important; }

/* Tool box and About section dark mode support */
html.dark-mode .ts-tool-box,
html.dark-mode .ts-tool-full-desc { 
    background: #1e293b !important; 
    color: #f8fafc !important; 
    border-color: #334155 !important;
    color-scheme: dark !important;
}

/* Remove background for blog posts in dark mode */
html.dark-mode .ts-post-content.ts-tool-full-desc {
    background: transparent !important;
    border-color: var(--ts-border) !important;
    box-shadow: none !important;
}

/* Force all text elements inside to be light, except those with specific color classes */
html.dark-mode .ts-tool-box *:not([class*="verdict"]):not([class*="outcome"]):not([class*="result"]):not([class*="status"]):not(i),
html.dark-mode .ts-tool-full-desc *:not(i) { 
    color: #f8fafc !important; 
}

/* Target a wide range of common container/card classes to force dark backgrounds */
html.dark-mode .ts-tool-box :is(div, section, article, [class*="wrap"], [class*="container"], [class*="card"], [class*="box"], [class*="item"], [class*="panel"], [class*="card"]) {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Deep backgrounds for nested cards/inputs */
html.dark-mode .ts-tool-box :is(.team-card, .stat-item, .math-breakdown, [class*="input-wrap"], input, textarea, select) {
    background: #0f172a !important;
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* Ensure inputs remain legible */
html.dark-mode .ts-tool-box :is(input, textarea, select) {
    color: #f8fafc !important;
}

html.dark-mode .ts-tool-box input::placeholder,
html.dark-mode .ts-tool-box textarea::placeholder { color: #94a3b8; }

/* Force text visibility in dark containers */
html.dark-mode .blog-content,
html.dark-mode .blog-content *,
html.dark-mode .ts-post-content,
html.dark-mode .ts-post-content * { color: #e2e8f0 !important; }
html.dark-mode .blog-content a,
html.dark-mode .ts-post-content a { color: #f87171 !important; }

/* Border overrides */
html.dark-mode [style*="border:1px solid #e2e8f0"],
html.dark-mode [style*="border: 1px solid #e2e8f0"],
html.dark-mode [style*="border-bottom:1px solid #e2e8f0"],
html.dark-mode [style*="border-top:1px solid #e2e8f0"],
html.dark-mode [style*="border-bottom: 1px solid #e2e8f0"],
html.dark-mode [style*="border-top: 1px solid #e2e8f0"],
html.dark-mode .ts-post-meta-bar,
html.dark-mode .ts-author-box,
html.dark-mode .ts-archive-hero,
html.dark-mode .ts-related-posts-section { border-color: #334155 !important; }

/* Submit tool form inputs */
html.dark-mode [style*="border: 2px solid #e2e8f0"],
html.dark-mode [style*="border:2px solid #e2e8f0"]        { border-color: #334155 !important; background: #0f172a !important; color: #e2e8f0 !important; }

/* Comment section */
html.dark-mode .ts-comments-section [style*="background: #f8fafc"],
html.dark-mode .ts-comments-section [style*="background:#f8fafc"]  { background: #162032 !important; }
html.dark-mode .ts-comments-section [style*="background: #fff"],
html.dark-mode .ts-comments-section [style*="background:#fff"]     { background: #1e293b !important; }

/* Scrollbar in dark mode */
html.dark-mode .ts-cat-tabs::-webkit-scrollbar-thumb { background: #334155; }

/* Author Box v2 */
.ts-author-box-v2 {
    margin-top: 60px;
    background: var(--ts-white);
    border: 1px solid var(--ts-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.ts-author-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}
.ts-author-avatar-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}
.ts-author-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.ts-author-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #fff;
    color: #10b981;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.ts-author-header {
    flex: 1;
}
.ts-author-tag {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ts-primary);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.ts-author-name-v2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ts-text);
    margin: 0 0 10px;
}
.ts-author-socials {
    display: flex;
    gap: 12px;
}
.ts-author-socials a {
    width: 32px;
    height: 32px;
    background: #F1F5F9;
    color: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.ts-author-socials a:hover {
    background: var(--ts-primary);
    color: #fff;
    transform: translateY(-2px);
}
.ts-author-bio-v2 {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ts-secondary);
    margin: 0;
}

@media (max-width: 640px) {
    .ts-author-box-v2 { padding: 24px; }
    .ts-author-top { flex-direction: column; align-items: center; text-align: center; }
    .ts-author-socials { justify-content: center; }
    .ts-author-bio-v2 { text-align: center; }
}

/* Dark mode overrides for Author Box v2 */
html.dark-mode .ts-author-box-v2 { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-author-img { border-color: #334155; }
html.dark-mode .ts-author-badge { background: #1e293b; }
html.dark-mode .ts-author-name-v2 { color: #f8fafc; }
html.dark-mode .ts-author-socials a { background: #334155; color: #94a3b8; }
html.dark-mode .ts-author-socials a:hover { background: var(--ts-primary); color: #fff; }
html.dark-mode .ts-author-bio-v2 { color: #94a3b8; }

/* -- Submit Portal 2026 --------------------------------------------------- */
.ts-submit-page { padding: 80px 0; background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.05), transparent 400px); }
.ts-submit-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }

.ts-submit-hero { margin-bottom: 40px; }
.ts-badge-glow {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--ts-primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}
.ts-submit-title { font-size: 3rem; font-weight: 900; margin-bottom: 16px; color: var(--ts-text); letter-spacing: -0.02em; }
.ts-submit-title span { color: var(--ts-primary); background: linear-gradient(135deg, var(--ts-primary), #f87171); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.ts-submit-desc { font-size: 1.15rem; color: var(--ts-secondary); line-height: 1.6; max-width: 600px; }

.ts-submit-card-v2 {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.08), 0 18px 36px -18px rgba(0,0,0,0.1);
}

.ts-form-group { margin-bottom: 28px; }
.ts-form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ts-text);
    font-size: 1rem;
}
.ts-form-group label i { color: var(--ts-primary); font-size: 0.9rem; }

.ts-input-wrap { position: relative; }
.ts-input-wrap input, .ts-input-wrap textarea {
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--ts-text);
}
.ts-input-wrap input:focus, .ts-input-wrap textarea:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    outline: none;
}
.ts-input-hint { display: block; margin-top: 10px; color: var(--ts-muted); font-size: 0.85rem; }

.ts-btn-submit-v2 {
    width: 100%;
    background: #0f172a;
    color: #fff;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
}
.ts-btn-submit-v2:hover { background: var(--ts-primary); transform: translateY(-2px); box-shadow: 0 15px 30px rgba(239, 68, 68, 0.3); }

/* Sidebar Steps */
.ts-submit-sidebar { display: flex; flex-direction: column; gap: 20px; }
.ts-step-card {
    background: #fff;
    border: 1px solid var(--ts-border);
    padding: 24px;
    border-radius: 20px;
    transition: all 0.3s;
}
.ts-step-card:hover { border-color: var(--ts-primary); transform: translateX(5px); }
.ts-step-num {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--ts-primary);
    background: rgba(239, 68, 68, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.ts-step-card h4 { margin-bottom: 8px; font-weight: 800; color: var(--ts-text); }
.ts-step-card p { font-size: 0.9rem; color: var(--ts-secondary); margin: 0; line-height: 1.5; }

/* Alerts v2 */
.ts-alert-success-v2 { background: #ecfdf5; border-left: 5px solid #10b981; padding: 24px; border-radius: 20px; display: flex; gap: 20px; align-items: center; }
.ts-alert-icon { font-size: 2rem; color: #10b981; }
.ts-alert-text h4 { margin-bottom: 4px; color: #065f46; font-weight: 800; }
.ts-alert-text p { color: #065f46; margin: 0; }

/* Dark mode overrides for Alerts v2 */
html.dark-mode .ts-alert-success-v2 { background: #052e16; border-left-color: #10b981; }
html.dark-mode .ts-alert-text h4 { color: #6ee7b7; }
html.dark-mode .ts-alert-text p { color: #a7f3d0; }

@media (max-width: 992px) {
    .ts-submit-wrap { grid-template-columns: 1fr; }
    .ts-submit-sidebar { flex-direction: row; flex-wrap: wrap; }
    .ts-step-card { flex: 1; min-width: 200px; }
}

@media (max-width: 640px) {
    .ts-submit-title { font-size: 2.25rem; }
    .ts-submit-card-v2 { padding: 24px; }
}

/* â”€â”€ Success CTA Block â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ts-success-cta {
    margin-top: 36px;
    padding: 40px 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}
.ts-success-cta-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(239,68,68,0.35);
    animation: ts-cta-pulse 2.5s ease-in-out infinite;
}
@keyframes ts-cta-pulse {
    0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 8px 24px rgba(239,68,68,0.35); }
    50%       { transform: translateY(-5px) scale(1.05); box-shadow: 0 16px 36px rgba(239,68,68,0.45); }
}
.ts-success-cta-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.4px;
}
.ts-success-cta-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.6;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.ts-success-cta-btns {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
}
/* Primary button â€” animated gradient with shimmer */
.ts-cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 36px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    box-shadow: 0 8px 24px rgba(239,68,68,0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ts-cta-btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    animation: ts-shimmer 2.8s infinite;
}
@keyframes ts-shimmer {
    0%   { left: -75%; }
    60%  { left: 130%; }
    100% { left: 130%; }
}
.ts-cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(239,68,68,0.4);
}
/* Secondary button â€” ghost/outline style */
.ts-cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #64748b;
    text-decoration: none;
    background: transparent;
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease;
}
.ts-cta-btn-secondary:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239,68,68,0.04);
}

/* Dark mode overrides */
html.dark-mode .ts-success-cta {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
html.dark-mode .ts-success-cta-title { color: #f1f5f9; }
html.dark-mode .ts-success-cta-sub   { color: #94a3b8; }
html.dark-mode .ts-cta-btn-secondary {
    color: #94a3b8;
    border-color: #334155;
}
html.dark-mode .ts-cta-btn-secondary:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239,68,68,0.08);
}
@media (max-width: 480px) {
    .ts-success-cta { padding: 28px 20px; }
    .ts-cta-btn-primary, .ts-cta-btn-secondary { width: 100%; justify-content: center; }
}

/* Dark Mode Portal */
html.dark-mode .ts-submit-card-v2 { background: rgba(30, 41, 59, 0.7); border-color: rgba(255,255,255,0.05); }
html.dark-mode .ts-input-wrap input, 
html.dark-mode .ts-input-wrap textarea { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html.dark-mode .ts-step-card { background: #1e293b; border-color: #334155; }
html.dark-mode .ts-step-card h4 { color: #f8fafc; }
html.dark-mode .ts-btn-submit-v2 { background: var(--ts-primary); }


/* PREMIUM HOW TO USE SECTION */
.ts-how-to-wrapper {
    background: var(--ts-bg);
    border: 1px solid var(--ts-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.ts-how-to-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ts-primary) 0%, #f43f5e 100%);
}

.ts-how-to-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.ts-how-to-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--ts-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.ts-how-to-header h4 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ts-text);
    letter-spacing: -0.01em;
}

.ts-how-to-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.ts-step-item {
    background: var(--ts-bg-alt);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.ts-step-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(0,0,0,0.1);
    border-color: var(--ts-primary);
}

.ts-step-number {
    position: absolute;
    top: -12px;
    left: 24px;
    width: 28px;
    height: 28px;
    background: var(--ts-primary);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.ts-step-content h5 {
    margin: 8px 0 10px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ts-text);
}

.ts-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ts-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVENESS AND FAILSAFE SYSTEM FOR ALL TOOLS
   ========================================================================== */

/* 1. Global Box-Sizing & Failsafe Max-Width for Tool Elements */
.ts-tool-box,
.ts-tool-box * {
    box-sizing: border-box !important;
}

/* 2. Global Max-Width constraints inside the tool container */
.ts-tool-box input,
.ts-tool-box select,
.ts-tool-box textarea,
.ts-tool-box button,
.ts-tool-box div,
.ts-tool-box section,
.ts-tool-box table,
.ts-tool-box form {
    max-width: 100% !important;
}

/* 3. Table Horizontal Scroll Failsafe */
.ts-tool-box table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* 4. Auto-collapse grid layouts and flex-containers inside tools on mobile */
@media (max-width: 640px) {
    /* Collapse CSS grid elements (keep display:grid so grid-template-columns works) */
    .ts-tool-box [style*="grid-template-columns"],
    .ts-tool-box [class*="grid"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Collapse flex-row containers to column */
    .ts-tool-box [class*="row"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    /* Override inline widths and fixed containers inside tools */
    .ts-tool-box [style*="width:"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    
    /* Global safeguard: Force everything to stay inside bounds */
    .ts-tool-box * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Force all grids and flex containers inside tool box to column/wrap if they aren't explicitly protected */
    .ts-tool-box div {
        flex-wrap: wrap !important;
    }
    
    /* Force inputs/controls to take full width when collapsed (excluding files, radios, checkboxes, hidden) */
    .ts-tool-box :is(input:not([type="file"], [type="radio"], [type="checkbox"], [type="hidden"], [hidden]), select, textarea, button, .ts-input, .ts-btn, .ts-segmented label) {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure padding adjusts gracefully inside containers */
    .ts-tool-box {
        padding: 20px 16px !important;
    }
    
    /* Reset margins that could push items offscreen */
    .ts-tool-box [style*="margin-left"],
    .ts-tool-box [style*="margin-right"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ---- PROFESSIONAL HEADER SEARCH BAR ---- */
@media (min-width: 1025px) {
    .ts-header-inner { display: flex !important; flex-wrap: nowrap !important; gap: 16px !important; height: auto !important; min-height: 76px !important; padding: 0 6% !important; align-items: center !important; justify-content: space-between !important; }
    .ts-site-logo { flex: 0 0 auto !important; }
    .ts-header-search { flex: 1 1 auto; max-width: 400px; min-width: 200px; margin: 0 20px; display: block !important; }
    .ts-header-search form { position: relative; display: flex; align-items: center; }
    .ts-header-search input { width: 100%; padding: 10px 16px 10px 40px; border-radius: 99px; border: 1px solid var(--ts-border); background: var(--ts-surface-2, #f1f5f9); color: var(--ts-text); font-size: 0.9rem; transition: all 0.2s; }
    .ts-header-search input:focus { background: #fff; border-color: var(--ts-primary); box-shadow: 0 0 0 3px rgba(239,68,68,0.1); outline: none; }
    html.dark-mode .ts-header-search input { background: #1e293b; color: #fff; border-color: rgba(255,255,255,0.1); }
    html.dark-mode .ts-header-search input:focus { background: #0f172a; border-color: var(--ts-primary); }
    .ts-header-search i { position: absolute; left: 14px; color: var(--ts-muted); }
    .ts-header-collapse { flex: 1 1 auto !important; display: flex; justify-content: flex-end !important; position: static !important; box-shadow: none !important; background: transparent !important; opacity: 1 !important; visibility: visible !important; transform: none !important; padding: 0 !important; }
}
@media (max-width: 1024px) {
  html.ts-menu-open, body.ts-menu-open { overflow: hidden !important; height: 100vh !important; overscroll-behavior: none !important; touch-action: none !important; }
  .ts-header-collapse { order: 4; display: none !important; width: 100% !important; position: absolute !important; top: 100% !important; left: 0 !important; right: 0 !important; height: calc(100vh - 72px) !important; overflow-y: auto !important; overscroll-behavior: contain !important; touch-action: auto !important; background: var(--ts-surface) !important; padding: 20px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; z-index: 99; }
  .ts-header-collapse.active { display: block !important; }
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE IMPROVEMENTS v2 â€” Tool Pages, Option Panels & All Views
   Audit: May 2026
   Covers: tablet (768px), mobile (640px), small (480px), micro (375px)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ 1. TABLET BREAKPOINT (â‰¤ 768px): Tool internals & page layouts â”€â”€ */
@media (max-width: 768px) {

    /* Single tool page â€” reduce excessive vertical whitespace */
    .ts-single-page {
        padding: 24px 0 48px;
    }

    /* Tool box â€” lighter padding and rounding */
    .ts-tool-box {
        padding: 20px 16px !important;
        border-radius: 12px !important;
        min-height: 0 !important;
    }

    /* Tool headings and description */
    .ts-tool-title {
        font-size: clamp(1.4rem, 5vw, 2rem);
        margin-bottom: 8px;
    }
    .ts-tool-short-desc {
        font-size: 0.95rem;
        margin-bottom: 18px;
    }

    /* Inner tool headings â€” downscale AI-generated large headers */
    .ts-tool-box h2 { font-size: 1.2rem !important; }
    .ts-tool-box h3 { font-size: 1.05rem !important; }
    .ts-tool-box h4 { font-size: 0.95rem !important; }

    /* Labels inside tool option panels */
    .ts-tool-box label {
        font-size: 0.875rem !important;
        margin-bottom: 5px !important;
    }

    /* â”€â”€ Inline-style 2-column grid patterns (AI-generated) â†’ 1 column â”€â”€ */
    .ts-tool-box [style*="grid-template-columns: 1fr 1fr"],
    .ts-tool-box [style*="grid-template-columns:1fr 1fr"],
    .ts-tool-box [style*="grid-template-columns: repeat(2,"],
    .ts-tool-box [style*="grid-template-columns:repeat(2,"],
    .ts-tool-box [style*="grid-template-columns: repeat(2, "] {
        grid-template-columns: 1fr !important;
    }

    /* â”€â”€ 3-column â†’ 2-column at tablet â”€â”€ */
    .ts-tool-box [style*="grid-template-columns: 1fr 1fr 1fr"],
    .ts-tool-box [style*="grid-template-columns:1fr 1fr 1fr"],
    .ts-tool-box [style*="grid-template-columns: repeat(3,"],
    .ts-tool-box [style*="grid-template-columns:repeat(3,"],
    .ts-tool-box [style*="grid-template-columns: repeat(3, "] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* â”€â”€ 4+ column â†’ 2-column at tablet â”€â”€ */
    .ts-tool-box [style*="grid-template-columns: repeat(4,"],
    .ts-tool-box [style*="grid-template-columns: repeat(4, "],
    .ts-tool-box [style*="grid-template-columns: repeat(5,"],
    .ts-tool-box [style*="grid-template-columns: repeat(5, "] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* â”€â”€ Common AI option/control row class patterns â†’ column â”€â”€ */
    .ts-tool-box [class*="option-row"],
    .ts-tool-box [class*="options-row"],
    .ts-tool-box [class*="control-row"],
    .ts-tool-box [class*="controls-row"],
    .ts-tool-box [class*="setting-row"],
    .ts-tool-box [class*="settings-row"],
    .ts-tool-box [class*="input-row"],
    .ts-tool-box [class*="form-row"],
    .ts-tool-box [class*="field-row"] {
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* â”€â”€ Common AI option panel class patterns â†’ reduce padding â”€â”€ */
    .ts-tool-box [class*="option-panel"],
    .ts-tool-box [class*="options-panel"],
    .ts-tool-box [class*="settings-panel"],
    .ts-tool-box [class*="control-panel"],
    .ts-tool-box [class*="config-panel"] {
        padding: 14px !important;
    }

    /* â”€â”€ Inline fixed-px widths set on tool containers â†’ fluid â”€â”€ */
    .ts-tool-box [style*="width: 5"],
    .ts-tool-box [style*="width: 6"],
    .ts-tool-box [style*="width: 7"],
    .ts-tool-box [style*="width: 8"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* â”€â”€ Security bar â€” compact on tablet â”€â”€ */
    .ts-security-bar-inner {
        font-size: 0.8rem;
        padding: 10px 12px;
        align-items: flex-start;
        gap: 8px;
    }

    /* â”€â”€ Related tools section â”€â”€ */
    .ts-related-section {
        margin-top: 24px;
        padding: 24px 0 16px;
    }
    .ts-related-head {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .ts-related-title { font-size: 1.3rem; }
    .ts-related-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 14px;
    }

    /* â”€â”€ How-to section â”€â”€ */
    .ts-how-to-steps {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .ts-how-to-wrapper {
        padding: 20px 16px;
        margin-bottom: 1.5rem;
    }
    .ts-how-to-header h4 { font-size: 1.1rem; }

    /* â”€â”€ Archive hero compact â”€â”€ */
    .ts-archive-hero {
        padding: 36px 20px;
        margin-bottom: 28px;
        border-radius: 18px;
    }
    .ts-archive-hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
    .ts-archive-hero p { font-size: 1rem; }

    /* â”€â”€ Archive page section padding â”€â”€ */
    .ts-archive-page { padding: 28px 0 48px; }

    /* â”€â”€ Search page blog grid â†’ single column â”€â”€ */
    .ts-blog-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }
    .ts-search-page { padding: 40px 0; }

    /* â”€â”€ FAQ section padding â”€â”€ */
    .ts-faq-question { padding: 18px 20px; }
    .ts-faq-answer-inner { padding: 0 20px; }

    /* â”€â”€ Contact page â”€â”€ */
    .ts-contact-form-wrap { padding: 24px 20px; }

    /* â”€â”€ About page mission box â”€â”€ */
    .ts-mission-box { padding: 36px 20px; border-radius: 24px; }
}

/* â”€â”€ 2. MOBILE BREAKPOINT (â‰¤ 640px): Aggressive collapse â”€â”€ */
@media (max-width: 640px) {

    /* Single tool page â€” minimal vertical breathing room */
    .ts-single-page { padding: 16px 0 36px; }

    /* Tool box â€” tightest safe padding */
    .ts-tool-box {
        padding: 16px 12px !important;
        border-radius: 10px !important;
    }

    /* All 3+ column grids â†’ single column */
    .ts-tool-box [style*="grid-template-columns: 1fr 1fr 1fr"],
    .ts-tool-box [style*="grid-template-columns:1fr 1fr 1fr"],
    .ts-tool-box [style*="grid-template-columns: repeat(3,"],
    .ts-tool-box [style*="grid-template-columns:repeat(3,"],
    .ts-tool-box [style*="grid-template-columns: repeat(3, "],
    .ts-tool-box [style*="grid-template-columns: repeat(4,"],
    .ts-tool-box [style*="grid-template-columns: repeat(4, "],
    .ts-tool-box [style*="grid-template-columns: repeat(5,"],
    .ts-tool-box [style*="grid-template-columns: repeat(5, "] {
        grid-template-columns: 1fr !important;
    }

    /* Inline flex-row containers â†’ column (catch AI style="display:flex" patterns) */
    .ts-tool-box [style*="display:flex"],
    .ts-tool-box [style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Exceptions: preserve row direction inside buttons and badge-like elements */
    .ts-tool-box button,
    .ts-tool-box a.ts-btn,
    .ts-tool-box [class*="badge"],
    .ts-tool-box [class*="chip"],
    .ts-tool-box [class*="tag"] {
        flex-direction: row !important;
    }

    /* Reduce input/button size for better thumb targets on small screens */
    .ts-tool-box input,
    .ts-tool-box select,
    .ts-tool-box textarea {
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
    }
    .ts-tool-box button {
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }

    /* Related tools â€” single column */
    .ts-related-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* Archive page */
    .ts-archive-hero {
        padding: 24px 16px;
        margin-bottom: 20px;
        border-radius: 14px;
    }
    .ts-archive-page { padding: 20px 0 36px; }

    /* Tool cards â€” compact */
    .ts-tool-card { padding: 20px !important; }
    .ts-tool-icon { width: 46px; height: 46px; font-size: 20px; margin-bottom: 14px; }

    /* Security bar â€” very compact */
    .ts-security-bar-inner {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    /* How-to wrapper */
    .ts-how-to-wrapper { padding: 16px 12px; }

    /* Search page */
    .ts-search-page { padding: 28px 0; }

    /* FAQ question padding */
    .ts-faq-question { padding: 16px; }
    .ts-faq-answer-inner { padding: 0 16px; }

    /* Breadcrumb â€” prevent overflow on long paths */
    .ts-breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
}

/* â”€â”€ 3. EXTRA SMALL (â‰¤ 480px): Micro-adjustments â”€â”€ */
@media (max-width: 480px) {

    /* Tool box â€” absolute minimum padding */
    .ts-tool-box {
        padding: 14px 10px !important;
        border-radius: 8px !important;
    }

    /* Form elements â€” smallest comfortable size */
    .ts-tool-box label  { font-size: 0.82rem !important; }
    .ts-tool-box input,
    .ts-tool-box select,
    .ts-tool-box textarea {
        font-size: 0.875rem !important;
        padding: 9px 10px !important;
    }
    .ts-tool-box button {
        font-size: 0.875rem !important;
        padding: 9px 14px !important;
    }

    /* Page padding */
    .ts-single-page  { padding: 12px 0 28px; }
    .ts-archive-page { padding: 16px 0 28px; }

    /* Archive hero */
    .ts-archive-hero {
        padding: 20px 14px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    /* Tool cards */
    .ts-tool-card {
        padding: 16px !important;
        border-radius: 12px;
    }
    .ts-tool-icon { width: 40px; height: 40px; font-size: 18px; }

    /* Security bar */
    .ts-security-bar-inner {
        font-size: 0.75rem;
        padding: 7px 9px;
    }

    /* Related card text */
    .ts-rel-name { font-size: 0.9rem; }

    /* Submit page */
    .ts-submit-title { font-size: 1.8rem !important; }
    .ts-submit-card-v2 { padding: 20px 16px; }
}

/* â”€â”€ 4. MICRO SCREENS (â‰¤ 375px): Edge-case phones â”€â”€ */
@media (max-width: 375px) {

    /* Shrink container padding to zero-margin bleed */
    .ts-container { padding: 0 5%; }

    /* Tool box absolute bare minimum */
    .ts-tool-box {
        padding: 12px 8px !important;
    }

    /* Smallest readable tool form controls */
    .ts-tool-box input,
    .ts-tool-box select,
    .ts-tool-box textarea,
    .ts-tool-box button {
        font-size: 0.85rem !important;
        padding: 8px !important;
    }

    /* Tool & archive hero */
    .ts-archive-hero h1 { font-size: 1.4rem !important; }
    .ts-tool-title { font-size: 1.35rem !important; }

    /* Shrink logo text on tiny screens instead of hiding it */
    .ts-logo-name { font-size: 1.1rem !important; max-width: calc(100vw - 180px) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Tool card padding */
    .ts-tool-card { padding: 14px !important; }
}

/* â”€â”€ 5. PREVENT OVERFLOW: Global safety net for tool pages â”€â”€ */
/* Catches any oversized container that still slips through media queries */
@media (max-width: 900px) {
    /* Inline-style fixed widths over 400px â†’ auto on tablet+ */
    .ts-tool-box [style*="width: 4"],
    .ts-tool-box [style*="width: 5"],
    .ts-tool-box [style*="width: 6"],
    .ts-tool-box [style*="width: 7"],
    .ts-tool-box [style*="width: 8"],
    .ts-tool-box [style*="width: 9"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    /* Prevent overflow from fixed-height tool panels */
    .ts-tool-box [style*="height: "] {
        height: auto !important;
        min-height: 0 !important;
    }
    /* Canvas and iframe inside tool boxes â€” constrain proportionally */
    .ts-tool-box canvas,
    .ts-tool-box iframe {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* -- reCAPTCHA Error Modal -- */
.ts-captcha-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.ts-captcha-modal-overlay.active { opacity: 1; visibility: visible; }
.ts-captcha-modal { background: var(--ts-white); border-radius: 20px; width: 90%; max-width: 420px; padding: 32px; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); transform: translateY(20px) scale(0.95); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); border: 1px solid var(--ts-border); }
.ts-captcha-modal-overlay.active .ts-captcha-modal { transform: translateY(0) scale(1); }
.ts-captcha-modal-icon { width: 64px; height: 64px; background: rgba(239, 68, 68, 0.1); color: #ef4444; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px; }
.ts-captcha-modal h3 { font-size: 1.5rem; font-weight: 800; color: var(--ts-text); margin-bottom: 12px; }
.ts-captcha-modal p { color: var(--ts-muted); font-size: 1.05rem; margin-bottom: 24px; line-height: 1.6; }
.ts-captcha-btn { width: 100%; background: #ef4444; color: #fff; border: none; padding: 14px; border-radius: 12px; font-weight: 700; font-size: 1.05rem; cursor: pointer; transition: all 0.2s; }
.ts-captcha-btn:hover { background: #dc2626; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3); }
[data-theme="dark"] .ts-captcha-modal-overlay { background: rgba(0, 0, 0, 0.8); }
[data-theme="dark"] .ts-captcha-modal { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .ts-captcha-modal h3 { color: #fff; }
[data-theme="dark"] .ts-captcha-modal p { color: #94a3b8; }

/* â”€â”€ Pinterest Save Hook â”€â”€ */
.pin-save-hook {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 16px 20px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
    font-size: 1.1rem;
    color: #b91c1c;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.05);
    display: inline-block;
    width: 100%;
}
html.dark-mode .pin-save-hook {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-left-color: #f87171;
}

/* â”€â”€ Blog Post Links â”€â”€ */
.ts-post-content a {
    color: #ef4444;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: all 0.2s;
}
.ts-post-content a:hover {
    color: #b91c1c;
    text-decoration-thickness: 2px;
}
html.dark-mode .ts-post-content a { color: #f87171; }
html.dark-mode .ts-post-content a:hover { color: #fca5a5; }

/* â”€â”€ Affiliate Notice â”€â”€ */
.affiliate-notice {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin: 20px 0 32px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.affiliate-notice::before {
    content: 'ðŸ’¡';
    font-size: 1.1rem;
    line-height: 1.4;
}
html.dark-mode .affiliate-notice {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    border-left-color: #fbbf24;
}

/* â”€â”€ What You'll Need Box â”€â”€ */
.what-you-need {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 32px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.what-you-need h3 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.what-you-need h3::before {
    content: 'ðŸ› ï¸';
}
.what-you-need ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}
.what-you-need ul li {
    margin-bottom: 8px;
    color: #334155;
}
html.dark-mode .what-you-need {
    background: #1e293b;
    border-color: #334155;
}
html.dark-mode .what-you-need h3 { color: #f1f5f9; }
html.dark-mode .what-you-need ul li { color: #cbd5e1; }

/* â”€â”€ Pinterest brand icon override â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Any tool card/single page that uses fa-pinterest gets the official red palette */
.ts-tool-icon:has(.fa-pinterest) {
    background: rgba(230, 0, 35, 0.1);
    color: #E60023;
}
.ts-tool-card:hover .ts-tool-icon:has(.fa-pinterest) {
    background: linear-gradient(135deg, #E60023 0%, #ad081b 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(230, 0, 35, 0.3);
}
html.dark-mode .ts-tool-icon:has(.fa-pinterest) {
    background: rgba(230, 0, 35, 0.15);
    color: #ff3352;
}

/* --- Auto-Branded Icon Overrides --- */
.ts-tool-icon:has(.fa-youtube) { background: rgba(255, 0, 0, 0.1); color: #FF0000; }
.ts-tool-card:hover .ts-tool-icon:has(.fa-youtube) { background: linear-gradient(135deg, #FF0000 0%, #cc0000 100%); color: #fff; box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3); }

.ts-tool-icon:has(.fa-instagram) { background: rgba(225, 48, 108, 0.1); color: #E1306C; }
.ts-tool-card:hover .ts-tool-icon:has(.fa-instagram) { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); color: #fff; box-shadow: 0 10px 20px rgba(225, 48, 108, 0.3); }

.ts-tool-icon:has(.fa-facebook), .ts-tool-icon:has(.fa-facebook-f) { background: rgba(24, 119, 242, 0.1); color: #1877F2; }
.ts-tool-card:hover .ts-tool-icon:has(.fa-facebook), .ts-tool-card:hover .ts-tool-icon:has(.fa-facebook-f) { background: linear-gradient(135deg, #1877F2 0%, #115ebb 100%); color: #fff; box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3); }

.ts-tool-icon:has(.fa-linkedin), .ts-tool-icon:has(.fa-linkedin-in) { background: rgba(10, 102, 194, 0.1); color: #0A66C2; }
.ts-tool-card:hover .ts-tool-icon:has(.fa-linkedin), .ts-tool-card:hover .ts-tool-icon:has(.fa-linkedin-in) { background: linear-gradient(135deg, #0A66C2 0%, #084c91 100%); color: #fff; box-shadow: 0 10px 20px rgba(10, 102, 194, 0.3); }

.ts-tool-icon:has(.fa-tiktok) { background: rgba(0, 0, 0, 0.1); color: #000000; }
.ts-tool-card:hover .ts-tool-icon:has(.fa-tiktok) { background: linear-gradient(135deg, #000000 0%, #ff0050 50%, #00f2fe 100%); color: #fff; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
html.dark-mode .ts-tool-icon:has(.fa-tiktok) { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* ============================================================
   #12 — Footer CSS (moved from inline <style> in main_footer)
   ============================================================ */
.ts-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}
.ts-footer-head {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 25px;
}
.ts-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ts-footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.ts-footer-link:hover {
    color: var(--ts-primary);
    padding-left: 5px;
}
.ts-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}
.ts-footer-bottom {
    padding: 30px 0;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
@media (max-width: 1024px) {
    .ts-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .ts-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .ts-footer-grid div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ts-social-group { justify-content: center; }
    .ts-footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

/* ============================================================
   #13/#14/#15 — Hero compact & stats classes
   ============================================================ */
.ts-hero-compact {
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-accent) 100%);
    border-radius: 16px;
    padding: 24px 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.ts-hero-compact h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 8px;
}
.ts-hero-compact p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    max-width: 580px;
    margin: 0 auto 20px;
    line-height: 1.5;
    /* #15 — prevent 'sign-ups' breaking across lines */
    word-break: keep-all;
    overflow-wrap: normal;
}
.ts-hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 16px;
}
@media (max-width: 360px) {
    .ts-hero-stats { gap: 10px; font-size: 0.75rem; }
}
.ts-section-heading {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--ts-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.ts-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* ============================================================
   #19 — Consistent tool card height
   ============================================================ */
/* .ts-tool-card already set to flex/column above */

/* ============================================================
   #30 — Category filter chip row scrollable on mobile
   ============================================================ */
#ts-chip-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
#ts-chip-row::-webkit-scrollbar { display: none; }

/* ============================================================
   #31 — Mobile drag-and-drop: show tap label
   ============================================================ */
@media (max-width: 768px) {
    .ts-drop-zone::after {
        content: 'Tap to select file';
        display: block;
        font-size: 1rem;
        font-weight: 600;
        color: var(--ts-primary);
        margin-top: 8px;
    }
    .ts-drop-zone .ts-drag-text { display: none; }
}
