/* FDD Ninja - Design System */
:root {
    --primary-color: #044d80;
    --secondary-color: #7ac546;
    --accent-color: #ecb940;
    --neutral-color: #cdcdcd;
    --primary-dark: #033a61;
    --primary-light: #0a6db3;
    --secondary-dark: #5ea033;
    --secondary-light: #98d76a;
    --accent-dark: #d4a530;
    --accent-light: #f0c960;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Navbar */
.fdd-navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.fdd-navbar .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.fdd-navbar .nav-link:hover,
.fdd-navbar .nav-link:focus {
    color: var(--primary-color);
    background-color: rgba(4, 77, 128, 0.06);
}

.fdd-navbar .nav-link:active,
.fdd-navbar .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.fdd-navbar .dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
}

.fdd-navbar .navbar-toggler {
    border-color: var(--border-color);
}

.fdd-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(74, 74, 106, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Footer */
.fdd-footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 2px 0;
}

.footer-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #fff;
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-primary);
    font-weight: 600;
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
    .hero-section {
        padding: 5rem 0;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Search Input */
.search-input {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--bg-white);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 77, 128, 0.15);
    outline: none;
}

/* Brand List */
.brand-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.15s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-list-item:hover {
    background-color: rgba(4, 77, 128, 0.04);
    color: var(--primary-color);
    text-decoration: none;
}

.brand-list-item:last-child {
    border-bottom: none;
}

.brand-count-badge {
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

/* FAQ List */
.faq-list-item {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.15s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.faq-list-item:hover {
    background-color: rgba(4, 77, 128, 0.04);
    text-decoration: none;
}

.faq-list-item:last-child {
    border-bottom: none;
}

.faq-category-badge {
    background-color: var(--accent-color);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

/* FAQ Detail */
.faq-detail-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.faq-detail-section h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.faq-answer-quote {
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    background-color: rgba(236, 185, 64, 0.08);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    margin: 1rem 0;
}

.faq-interpretation {
    border-left: 4px solid var(--secondary-color);
    padding: 1rem 1.5rem;
    background-color: rgba(122, 197, 70, 0.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1rem 0;
}

.faq-answer-quote .chat-table-responsive table,
.faq-interpretation .chat-table-responsive table,
.faq-answer-quote table,
.faq-interpretation table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-style: normal;
    font-size: 0.9rem;
}

.faq-answer-quote .chat-table-responsive table,
.faq-interpretation .chat-table-responsive table {
    margin: 0;
}

.faq-answer-quote th,
.faq-interpretation th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(4, 77, 128, 0.3);
    white-space: nowrap;
}

.faq-answer-quote td,
.faq-interpretation td {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
}

.faq-answer-quote tbody tr:nth-child(even),
.faq-interpretation tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.025);
}

.faq-answer-quote tbody tr:hover,
.faq-interpretation tbody tr:hover {
    background-color: rgba(4, 77, 128, 0.06);
}

.faq-answer-quote table + p,
.faq-interpretation table + p {
    margin-top: 0.75rem;
}

.faq-answer-quote > p:last-child,
.faq-interpretation > p:last-child {
    margin-bottom: 0;
}

/* Chat Styles */
.chat-container {
    height: calc(100vh - 130px);
    display: flex;
}

.chat-sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.chat-sidebar-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
    color: var(--text-primary);
    text-decoration: none;
}

.chat-sidebar-item:hover {
    background-color: rgba(4, 77, 128, 0.06);
    text-decoration: none;
    color: var(--text-primary);
}

.chat-sidebar-item.active {
    background-color: rgba(4, 77, 128, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.chat-sidebar-item .delete-btn {
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
}

.chat-sidebar-item:hover .delete-btn {
    opacity: 1;
}

.chat-sidebar-item .delete-btn:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.chat-message {
    max-width: 80%;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user-message {
    margin-left: auto;
}

.chat-message.assistant-message {
    margin-right: auto;
}

.chat-bubble {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .chat-bubble {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message .chat-bubble {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.assistant-message .chat-bubble h1,
.assistant-message .chat-bubble h2,
.assistant-message .chat-bubble h3 {
    color: var(--primary-color);
    margin-top: 0.75rem;
}

.assistant-message .chat-bubble code {
    background-color: var(--bg-light);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.85em;
}

.assistant-message .chat-bubble pre {
    background-color: var(--bg-light);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.assistant-message .chat-bubble ul,
.assistant-message .chat-bubble ol {
    padding-left: 1.25rem;
}

/* Horizontal scroll for wide markdown tables (mobile-friendly) */
.chat-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 0.75rem 0;
    border-radius: var(--radius-sm);
    scrollbar-width: thin;
}

.chat-table-responsive:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Tables inside chat bubbles (wrapped in .chat-table-responsive for horizontal scroll) */
.assistant-message .chat-bubble .chat-table-responsive table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Unwrapped table fallback (e.g. cached HTML) */
.assistant-message .chat-bubble > table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.assistant-message .chat-bubble thead th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(4, 77, 128, 0.3);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.assistant-message .chat-bubble tbody td {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
    white-space: nowrap;
}

.assistant-message .chat-bubble tbody td:first-child {
    font-weight: 500;
    white-space: normal;
    min-width: 140px;
}

.assistant-message .chat-bubble tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.025);
}

.assistant-message .chat-bubble tbody tr:hover {
    background-color: rgba(4, 77, 128, 0.06);
}

/* Widen chat messages that contain tables */
.chat-message.assistant-message.has-table {
    max-width: 95%;
}

.chat-message.assistant-message.has-table .chat-bubble {
    overflow-x: visible;
}

.chat-message.assistant-message {
    position: relative;
}

.assistant-message .chat-bubble {
    position: relative;
}

.copy-btn-corner {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1;
}

.chat-message-toolbar {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.copy-message-btn {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.copy-message-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 1px 4px rgba(4, 77, 128, 0.15);
}

.copy-message-btn.copied {
    color: #198754;
    border-color: #198754;
    background-color: #f0fdf4;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-white);
}

.chat-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input-group textarea {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
    min-height: 48px;
    max-height: 150px;
}

.chat-input-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 77, 128, 0.1);
    outline: none;
}

.chat-send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
}

.chat-send-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Suggested Questions */
.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem;
}

.suggested-question-btn {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    text-align: left;
    max-width: 350px;
}

.suggested-question-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* Follow-up question buttons */
.follow-up-questions {
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color);
}

.follow-up-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.follow-up-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.follow-up-btn:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.follow-up-btn:active {
    transform: translateX(2px);
    box-shadow: none;
}

.follow-up-btn::before {
    content: "\2192";
    margin-right: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.follow-up-btn:hover::before {
    opacity: 1;
}

/* Streaming indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--neutral-color);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Breadcrumbs */
.fdd-breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
}

.fdd-breadcrumb .breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.fdd-breadcrumb .breadcrumb-item.active {
    color: var(--text-muted);
}

/* FAQ Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(4, 77, 128, 0.04);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(4, 77, 128, 0.1);
    border-color: transparent;
}

.accordion-button::after {
    filter: none;
}

.accordion-button:not(.collapsed)::after {
    filter: none;
}

/* Utility */
.text-primary-custom { color: var(--primary-color) !important; }
.text-secondary-custom { color: var(--secondary-color) !important; }
.text-accent-custom { color: var(--accent-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-secondary-custom { background-color: var(--secondary-color) !important; }
.bg-accent-custom { background-color: var(--accent-color) !important; }

/* Responsive adjustments */
@media (max-width: 767px) {
    .chat-sidebar {
        display: none;
    }

    .chat-sidebar.show {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        box-shadow: var(--shadow-lg);
    }

    .chat-message {
        max-width: 90%;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section {
        padding: 3rem 0;
    }
}

/* Error page */
.error-container {
    text-align: center;
    padding: 5rem 2rem;
}

.error-container h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== Redesigned Hero Section ========== */
.hero-redesign {
    padding: 56px 24px 68px;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.hero-redesign::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(122, 197, 70, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-redesign .hero-content {
    max-width: 820px;
    position: relative;
    z-index: 2;
}

.hero-redesign h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

/* Trust strip pill */
.trust-strip {
    background: rgba(122, 197, 70, 0.12);
    border: 1px solid rgba(122, 197, 70, 0.3);
    border-radius: 100px;
    padding: 7px 18px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.trust-strip i {
    color: var(--secondary-color);
    font-size: 15px;
}

.trust-highlight {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Search card */
.search-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 28px 20px;
    max-width: 700px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.search-card-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--primary-color);
}

.search-card-label i {
    font-size: 17px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
    animation: heroGlowPulse 3s ease-in-out infinite;
}

.search-input-wrap:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(122, 197, 70, 0.15), 0 0 20px rgba(122, 197, 70, 0.15);
    animation: none;
}

@keyframes heroGlowPulse {
    0%, 100% {
        border-color: #e0e0e0;
        box-shadow: 0 0 0 0px transparent, 0 2px 8px rgba(0,0,0,0.06);
    }
    50% {
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 5px rgba(122, 197, 70, 0.15), 0 0 24px rgba(122, 197, 70, 0.15);
    }
}

.search-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    color: var(--secondary-color);
    font-size: 20px;
    flex-shrink: 0;
    opacity: 0.85;
}

.search-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15.5px;
    font-family: inherit;
    padding: 15px 12px;
    color: #222;
    background: transparent;
    min-width: 0;
}

.search-input-field::placeholder {
    color: #999;
}

.cursor-blink {
    display: inline-block;
    width: 2px;
    height: 22px;
    background: var(--primary-color);
    margin-right: 4px;
    flex-shrink: 0;
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.search-send-btn {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border: none;
    background: var(--primary-color);
    color: #fff;
    border-radius: 10px;
    font-size: 17px;
    cursor: pointer;
    margin: 4px 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    animation: sendNudge 5s ease-in-out infinite;
}

.search-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

@keyframes sendNudge {
    0%, 85%, 100% { transform: scale(1); }
    88% { transform: scale(1.12); }
    91% { transform: scale(0.97); }
    94% { transform: scale(1.06); }
}

/* Microcopy row */
.search-micro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12.5px;
    color: #555;
    margin-top: 10px;
}

.search-micro a {
    color: var(--text-secondary);
}

.free-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e8f9de, #d4f5c0);
    color: #2d7a0e;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 5px;
    font-size: 11px;
    letter-spacing: 0.3px;
}

/* Social proof */
.search-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.proof-avatars {
    display: flex;
}

.proof-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.proof-avatar:first-child { margin-left: 0; }
.proof-avatar.a1 { background: #4A90D9; }
.proof-avatar.a2 { background: #7ac546; }
.proof-avatar.a3 { background: #E8913A; }
.proof-avatar.a4 { background: #9B59B6; }

.proof-text {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.proof-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Source badge */
.search-source-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 12.5px;
    color: #888;
    font-weight: 500;
}

.search-source-badge i {
    color: var(--secondary-color);
    font-size: 14px;
}

.search-source-badge strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Question chips */
.question-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.q-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 100px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.q-chip:hover {
    background: rgba(122, 197, 70, 0.2);
    border-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-1px);
}

.q-chip i {
    font-size: 11px;
    opacity: 0.7;
}

/* CTA row */
.cta-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-cta-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.35);
}

.btn-cta-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

.btn-cta-solid {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid #fff;
}

.btn-cta-solid:hover {
    background: #f0f7ff;
    color: var(--primary-color);
}

/* Stats row */
.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.hero-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 4px;
    font-weight: 500;
}

/* Responsive hero */
@media (max-width: 768px) {
    .hero-redesign h1 {
        font-size: 2rem;
    }

    .search-card {
        padding: 20px 16px 18px;
        margin-left: 8px;
        margin-right: 8px;
    }

    .search-input-field {
        font-size: 14px;
        padding: 14px 8px;
    }

    .question-chips {
        gap: 8px;
    }

    .q-chip {
        font-size: 12px;
        padding: 7px 12px;
    }

    .hero-stats-row {
        gap: 24px;
    }

    .hero-stat-num {
        font-size: 1.2rem;
    }

    .search-micro {
        flex-direction: column;
        gap: 4px;
    }

    .search-social-proof {
        flex-direction: column;
        gap: 6px;
    }

    .search-source-badge {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* Industry tag highlighting */
.industry-badge {
    background-color: #e8a317;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15em 0.5em;
    vertical-align: middle;
}

.industry-row {
    background-color: rgba(232, 163, 23, 0.06) !important;
}

.industry-row:hover {
    background-color: rgba(232, 163, 23, 0.12) !important;
}
