/**
 * Expeditious Tools - Base64 Encode & Decode Stylesheet
 * High-performance, mobile-first, WCAG 2.2 AA accessible design system.
 */

:root {
    --b64-primary: #ffc800;
    --b64-primary-hover: #e6b400;
    --b64-primary-light: rgba(255, 200, 0, 0.12);
    --b64-primary-border: rgba(255, 200, 0, 0.35);
    --b64-dark: #0f172a;
    --b64-dark-surface: #1e293b;
    --b64-dark-border: #334155;
    --b64-surface: #ffffff;
    --b64-surface-alt: #f8fafc;
    --b64-border: #e2e8f0;
    --b64-border-hover: #cbd5e1;
    --b64-text: #0f172a;
    --b64-text-muted: #64748b;
    --b64-text-light: #94a3b8;
    --b64-success: #10b981;
    --b64-success-light: #ecfdf5;
    --b64-success-border: #a7f3d0;
    --b64-warn: #f59e0b;
    --b64-warn-light: #fffbeb;
    --b64-error: #ef4444;
    --b64-error-light: #fef2f2;
    --b64-error-border: #fecaca;
    --b64-code-bg: #0f172a;
    --b64-code-text: #e2e8f0;
    --b64-radius: 12px;
    --b64-radius-sm: 8px;
    --b64-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --b64-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    --b64-shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.15);
    --b64-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Skip link for WCAG 2.2 */
.skip-link {
    position: absolute;
    top: -60px;
    left: 20px;
    background: var(--b64-primary);
    color: #111;
    font-weight: 700;
    padding: 10px 18px;
    z-index: 99999;
    border-radius: var(--b64-radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 20px;
    outline: 3px solid #111;
}

/* Hero Masthead */
.base64-masthead {
    background-color: #111418;
    background-image: linear-gradient(rgba(17, 20, 24, 0.88), rgba(17, 20, 24, 0.94)), url('/assets/img/background.webp');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 150px 16px 60px;
    text-align: center;
}

@media (max-width: 767px) {
    .base64-masthead {
        background-image: linear-gradient(rgba(17, 20, 24, 0.90), rgba(17, 20, 24, 0.96)), url('/assets/img/background-mobile.webp');
        padding: 82px 12px 20px;
    }
}

.base64-breadcrumbs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 14px;
}

.base64-breadcrumbs a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--b64-transition);
}

.base64-breadcrumbs a:hover,
.base64-breadcrumbs a:focus-visible {
    color: var(--b64-primary);
    text-decoration: underline;
}

.base64-breadcrumbs .sep {
    color: #64748b;
    font-size: 0.8rem;
}

.base64-breadcrumbs [aria-current="page"] {
    color: var(--b64-primary);
    font-weight: 600;
}

.base64-hero-h1 {
    font-size: clamp(1.6rem, 3.8vw, 2.4rem);
    font-weight: 800;
    line-height: 2.25;
    margin: 0 auto 10px;
    max-width: 900px;
    color: #ffffff;
    letter-spacing: -0.015em;
}

.base64-hero-h1 span {
    color: var(--b64-primary);
}

.base64-hero-subhead {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: #cbd5e1;
    max-width: 780px;
    margin: 0 auto 18px;
    line-height: 1.6;
}

/* Trust badges bar */
.base64-trust-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    margin-top: 30px;
}

.b64-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #f1f5f9;
    backdrop-filter: blur(4px);
}

.b64-trust-pill svg {
    color: var(--b64-primary);
    flex-shrink: 0;
}

/* Tool Application Wrapper */
.base64-app-container {
    max-width: 1240px;
    margin: -16px auto 50px;
    padding: 0 16px;
    position: relative;
    z-index: 10;
}

@media (max-width: 767px) {
    .base64-app-container {
        margin-top: 10px;
        padding: 0 12px;
    }
}

.base64-card {
    background: var(--b64-surface);
    border-radius: var(--b64-radius);
    box-shadow: var(--b64-shadow-lg);
    border: 1px solid var(--b64-border);
    overflow: hidden;
    transition: var(--b64-transition);
}

/* Main Tool Tabs (Text vs Image/File vs Base64 to Image) */
.tool-type-tabs {
    display: flex;
    background: #0f172a;
    border-bottom: 2px solid var(--b64-dark-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.tool-type-tabs::-webkit-scrollbar {
    display: none;
}

.type-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    min-height: 48px;
    transition: var(--b64-transition);
}

.type-tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}

.type-tab-btn.active {
    color: var(--b64-primary);
    border-bottom-color: var(--b64-primary);
    background: rgba(255, 200, 0, 0.06);
}

.type-tab-btn:focus-visible {
    outline: 2px solid var(--b64-primary);
    outline-offset: -2px;
}

/* Top Action Toolbar */
.base64-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: var(--b64-surface-alt);
    border-bottom: 1px solid var(--b64-border);
}

@media (max-width: 600px) {
    .base64-toolbar {
        padding: 12px 14px;
    }
}

/* Segmented Mode Switcher (Encode | Decode) */
.mode-segmented-control {
    display: inline-flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: var(--b64-radius-sm);
    gap: 4px;
}

.seg-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--b64-transition);
}

.seg-btn:hover {
    color: #0f172a;
}

.seg-btn.active {
    background: #0f172a;
    color: var(--b64-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.seg-btn:focus-visible {
    outline: 2px solid var(--b64-primary);
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.btn-tool-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--b64-border);
    background: var(--b64-surface);
    color: var(--b64-text);
    border-radius: var(--b64-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
    transition: var(--b64-transition);
}

.btn-tool-action:hover {
    background: #f1f5f9;
    border-color: var(--b64-border-hover);
    color: #000;
}

.btn-tool-action:focus-visible {
    outline: 2px solid var(--b64-primary);
    outline-offset: 1px;
}

.btn-tool-action.btn-accent {
    background: var(--b64-primary);
    border-color: var(--b64-primary-hover);
    color: #111;
}

.btn-tool-action.btn-accent:hover {
    background: var(--b64-primary-hover);
}

/* Auto-detect notification banner */
.auto-detect-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    background: var(--b64-warn-light);
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.88rem;
    animation: fadeIn 0.3s ease;
}

.auto-detect-banner.show {
    display: flex;
}

.auto-detect-banner .btn-switch-decode {
    background: #b45309;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
}

.auto-detect-banner .btn-switch-decode:hover {
    background: #92400e;
}

/* Converter Workspace (2 Columns on Desktop) */
.converter-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--b64-border);
}

@media (max-width: 900px) {
    .converter-workspace {
        grid-template-columns: 1fr;
    }
}

.pane-wrapper {
    background: var(--b64-surface);
    display: flex;
    flex-direction: column;
}

.pane-wrapper:first-child {
    border-right: 1px solid var(--b64-border);
}

@media (max-width: 900px) {
    .pane-wrapper:first-child {
        border-right: none;
        border-bottom: 1px solid var(--b64-border);
    }
}

.pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--b64-border);
}

.pane-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pane-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-pane-action {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
}

.btn-pane-action:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-pane-action:focus-visible {
    outline: 2px solid var(--b64-primary);
}

.pane-textarea-box {
    position: relative;
    flex: 1;
    display: flex;
}

.b64-textarea {
    width: 100%;
    min-height: 260px;
    height: 100%;
    padding: 16px 18px;
    border: none;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #0f172a;
    background: var(--b64-surface);
    resize: vertical;
}

.b64-textarea:focus {
    background: #ffffff;
}

.b64-textarea::placeholder {
    color: #94a3b8;
}

/* Readonly output styling */
.b64-textarea[readonly] {
    background: #fcfdfd;
}

/* Status & Stats bar below each textarea */
.pane-footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 18px;
    background: #f8fafc;
    border-top: 1px solid var(--b64-border);
    font-size: 0.8rem;
    color: #64748b;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-pill strong {
    color: #1e293b;
}

.stat-pill.badge-overhead {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
}

/* Inline Validation Alert */
.validation-alert {
    display: none;
    padding: 12px 18px;
    background: var(--b64-error-light);
    border-top: 1px solid var(--b64-error-border);
    color: #991b1b;
    font-size: 0.86rem;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.validation-alert.show {
    display: flex;
}

.validation-alert .btn-fix-padding {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.validation-alert .btn-fix-padding:hover {
    background: #dc2626;
}

/* Options Bar (Collapsible / Toggleable) */
.options-drawer {
    border-top: 1px solid var(--b64-border);
    background: #ffffff;
    padding: 14px 20px;
}

.options-summary-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    user-select: none;
    list-style: none;
}

.options-summary-toggle::-webkit-details-marker {
    display: none;
}

.options-summary-toggle svg {
    transition: transform 0.2s ease;
}

details[open] .options-summary-toggle svg {
    transform: rotate(180deg);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--b64-border);
}

.option-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.option-select,
.option-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius-sm);
    font-size: 0.88rem;
    background: #ffffff;
    color: #0f172a;
}

.option-select:focus,
.option-input:focus {
    outline: 2px solid var(--b64-primary);
}

.option-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    margin-top: 24px;
}

.option-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ffc800;
    cursor: pointer;
}

/* Keyboard hint bar */
.shortcuts-hint-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 20px;
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.78rem;
    border-top: 1px solid #1e293b;
}

.shortcuts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.shortcuts-list kbd {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
}

/* File / Image Dropzone View */
.file-dropzone-view {
    padding: 24px;
    display: none;
}

.file-dropzone-view.active {
    display: block;
}

.b64-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--b64-radius);
    background: #f8fafc;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--b64-transition);
}

.b64-dropzone:hover,
.b64-dropzone.dragover {
    border-color: var(--b64-primary);
    background: #fffdf5;
}

.b64-dropzone:focus-visible {
    outline: 2px solid var(--b64-primary);
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    color: #64748b;
}

.dropzone-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.dropzone-sub {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 18px;
}

.file-preview-card {
    display: none;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius-sm);
    background: #ffffff;
    align-items: center;
    gap: 16px;
}

.file-preview-card.show {
    display: flex;
}

.file-thumb {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.file-info {
    flex: 1;
}

/* Base64 to Image Preview Area */
.b64-img-preview-box {
    display: none;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius-sm);
    background: #f8fafc;
    text-align: center;
}

.b64-img-preview-box.show {
    display: block;
}

.rendered-preview-img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
}

/* Floating Toast Notification */
.b64-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--b64-radius-sm);
    box-shadow: var(--b64-shadow-lg);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border-left: 4px solid var(--b64-primary);
}

.b64-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Content & Guide Layout */
.guide-wrapper {
    max-width: 1240px;
    margin: 40px auto 60px;
    padding: 0 16px;
}

.guide-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: start;
}

@media (max-width: 991px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }
}

/* Sticky Table of Contents */
.toc-sidebar {
    position: sticky;
    top: 90px;
    background: #ffffff;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius);
    padding: 20px;
    box-shadow: var(--b64-shadow-sm);
}

.toc-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--b64-transition);
}

.toc-list a:hover {
    color: #000;
    background: #f1f5f9;
}

.toc-list a.active {
    color: #000;
    font-weight: 700;
    background: var(--b64-primary-light);
    border-left: 3px solid var(--b64-primary);
}

/* In-depth Article Content */
.guide-article {
    background: #ffffff;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius);
    padding: 40px 45px;
    box-shadow: var(--b64-shadow-sm);
    color: #1e293b;
    line-height: 1.75;
}

@media (max-width: 767px) {
    .guide-article {
        padding: 24px 18px;
    }
}

.guide-article h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    scroll-margin-top: 100px;
}

.guide-article h2:first-of-type {
    margin-top: 0;
}

.guide-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 24px;
    margin-bottom: 12px;
    scroll-margin-top: 100px;
}

.guide-article p {
    font-size: 1.02rem;
    margin-bottom: 18px;
    color: #334155;
}

/* Featured snippet block */
.featured-snippet-box {
    background: #f8fafc;
    border-left: 4px solid var(--b64-primary);
    padding: 18px 22px;
    border-radius: 0 var(--b64-radius-sm) var(--b64-radius-sm) 0;
    margin: 20px 0 26px;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #0f172a;
}

.featured-snippet-box strong {
    color: #000;
}

/* Security Warning Box */
.security-alert-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 5px solid #f59e0b;
    border-radius: var(--b64-radius-sm);
    padding: 20px 24px;
    margin: 24px 0;
}

.security-alert-box h4 {
    color: #92400e;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-alert-box p {
    color: #78350f;
    margin-bottom: 0;
}

/* Code Snippets Section with Language Tabs */
.code-example-tabs {
    margin: 24px 0 32px;
    border: 1px solid #334155;
    border-radius: var(--b64-radius);
    overflow: hidden;
    background: #0f172a;
}

.code-tab-nav {
    display: flex;
    overflow-x: auto;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    scrollbar-width: none;
}

.code-tab-nav::-webkit-scrollbar {
    display: none;
}

.code-lang-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--b64-transition);
}

.code-lang-btn:hover {
    color: #ffffff;
}

.code-lang-btn.active {
    color: var(--b64-primary);
    border-bottom-color: var(--b64-primary);
    background: rgba(255, 200, 0, 0.08);
}

.code-tab-panel {
    display: none;
    position: relative;
}

.code-tab-panel.active {
    display: block;
}

.btn-copy-code {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--b64-transition);
}

.btn-copy-code:hover {
    background: #475569;
    color: #ffffff;
}

.code-tab-panel pre {
    margin: 0;
    padding: 20px 22px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Worked Step-by-Step Table */
.data-table-wrapper {
    overflow-x: auto;
    margin: 20px 0 28px;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.data-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid var(--b64-border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--b64-border);
    color: #334155;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #fbfcfe;
}

.data-table code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* FAQ Accordion */
.faq-container {
    margin-top: 30px;
}

.faq-item {
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: var(--b64-transition);
}

.faq-question-btn {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    border: none;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-question-btn:hover {
    background: #f1f5f9;
}

.faq-question-btn:focus-visible {
    outline: 2px solid var(--b64-primary);
    outline-offset: -2px;
}

.faq-icon-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
    color: #64748b;
}

.faq-item.open .faq-icon-arrow {
    transform: rotate(180deg);
}

.faq-answer-panel {
    display: none;
    padding: 18px 20px;
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.7;
    border-top: 1px solid var(--b64-border);
}

.faq-item.open .faq-answer-panel {
    display: block;
}

/* Meta Trust Footer */
.trust-author-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    margin-top: 36px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
}

/* More tools cards section */
.more-tools-section {
    max-width: 1240px;
    margin: 0 auto 60px;
    padding: 0 16px;
}

.more-tools-h2 {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    color: #0f172a;
    margin-bottom: 8px;
}

.more-tools-sub {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.more-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.tool-rec-card {
    background: #ffffff;
    border: 1px solid var(--b64-border);
    border-radius: var(--b64-radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--b64-shadow-sm);
    transition: var(--b64-transition);
    display: flex;
    flex-direction: column;
}

.tool-rec-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--b64-shadow);
    border-color: var(--b64-primary);
}

.tool-rec-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-rec-card p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
    flex: 1;
}

.tool-rec-cta {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tool-rec-card:hover .tool-rec-cta {
    color: #d97706;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}