/* Base Styles */
* {
    box-sizing: border-box;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #002B58;
    color: #FED402;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

/* ============================================
   Unified Button System
   ============================================ */

/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary button - Navy background */
.btn-primary {
    background: #002B58;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #001a3a;
}

/* Secondary button - White with border */
.btn-secondary {
    background: white;
    color: #002B58;
    border: 1px solid #002B58;
}

.btn-secondary:hover:not(:disabled) {
    background: #002B58;
    color: white;
}

/* Danger button - Red for warnings/errors */
.btn-danger {
    background: #A00000;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #800000;
}

/* Ghost button - Transparent with border */
.btn-ghost {
    background: transparent;
    color: #002B58;
    border: 1px solid currentColor;
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(0, 43, 88, 0.1);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Focus-visible styles for all interactive elements */
.btn:focus-visible {
    background-color: #E8F4FF;
    padding-left: 15px;
}

/* ============================================
   Accessibility - Focus-visible Styles
   ============================================ */

/* Form input focus styles */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    background-color: #E8F4FF;
    padding-left: 15px;
}

/* Anchor/link focus styles */
a:focus-visible {
    background-color: #E8F4FF;
    padding-left: 15px;
}

/* Generic button and interactive element focus styles */
button:focus-visible {
    background-color: #E8F4FF;
    padding-left: 15px;
}

/* ============================================
   Connection Warning Banner
   ============================================ */

.connection-warning-banner {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #A00000;
    color: white;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.connection-warning-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.connection-warning-banner.hide {
    transform: translateY(-100%);
    opacity: 0;
}

.connection-warning-banner.success {
    background: #28a745;
    transition: background 0.3s ease;
}

.connection-warning-banner.dissolve {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.connection-warning-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.connection-warning-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.connection-warning-text i {
    font-size: 1.25rem;
}

.connection-warning-retry {
    background: white;
    color: #CC0000;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.connection-warning-retry:hover {
    background: #F5F5F5;
}

.connection-warning-retry:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.connection-warning-dismiss {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.8;
}

.connection-warning-dismiss:hover {
    opacity: 1;
}

/* ============================================
   Progressive Loading Messages
   ============================================ */

.loading-progress-message {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 1rem;
    animation: fadeIn 0.3s ease;
}

.loading-progress-message.warning {
    color: #996600;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Utility Classes (replacing Tailwind) */
.h-8 {
    height: 2rem;
}

.max-w-\[1200px\] {
    max-width: 1200px;
}

.max-w-\[800px\] {
    max-width: 800px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.hidden {
    display: none;
}

/* ============================================
   Minimalist Mode - Hides landing elements during search
   ============================================ */
body.minimalist-mode .page-header,
body.minimalist-mode .stats-section,
body.minimalist-mode .hifld-section,
body.minimalist-mode #ctaSection,
body.minimalist-mode .footer,
body.minimalist-mode #inFocusSection,
body.minimalist-mode #collectionsSection {
    display: none !important;
}

body.minimalist-mode .unified-searchbox[data-position="landing"],
body.minimalist-mode .unified-searchbox[data-position="keywords"] {
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

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

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.text-white {
    color: white;
}

.text-hsdl-navy {
    color: #002B58;
}

.text-hsdl-blue {
    color: #0268BB;
}

.text-gray-200 {
    color: #767676;
}

.text-gray-400 {
    color: #767676;
}

.bg-hsdl-navy {
    background-color: #002B58;
}

.bg-hsdl-yellow {
    background-color: #FED402;
}

.bg-transparent {
    background-color: transparent;
}

.border-2 {
    border-width: 2px;
}

.border-white {
    border-color: white;
}

.flex-wrap {
    flex-wrap: wrap;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover\:bg-hsdl-gold:hover {
    background-color: #FCB900;
}

.hover\:bg-white:hover {
    background-color: white;
}

.hover\:text-hsdl-navy:hover {
    color: #002B58;
}

/* Responsive grid columns */
@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:flex {
        display: flex;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Minion Pro', Georgia, serif;
    color: #002B58;
}

/* Header */
.header {
    background-color: #002B58;
    color: white;
    padding: 0 1.5rem;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header > * {
    height: 100%;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}

.logo-link img {
    display: block;
}

body {
    padding-top: 80px;
}

/* ================================
   BETA NOTIFICATION BANNER
   ================================ */

.beta-banner {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 999;
    background: #FED402;
    color: #002B58;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 1.5rem 0.75rem;
}

.beta-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.beta-banner.hide {
    transform: translateY(-100%);
    opacity: 0;
}

.beta-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.beta-banner-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.beta-info-icon {
    font-size: 1.5rem;
    color: #002B58;
    flex-shrink: 0;
    margin-top: -2px;
}

.beta-message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #002B58;
    font-weight: 500;
}

.beta-feedback-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: #002B58;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.beta-feedback-link:hover {
    background: #002B58;
    color: #FED402;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.beta-feedback-link i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    line-height: 1;
    vertical-align: middle;
    margin-top: -2px;
}

.beta-feedback-link:hover i {
    transform: translateX(3px);
}

.beta-banner-close {
    background: transparent;
    border: none;
    color: #002B58;
    width: 36px;
    height: 36px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.375rem;
    opacity: 0.7;
}

/* ================================
   CONTENT NOTICE BANNER
   Inset notice inside search results
   ================================ */

.content-notice-banner {
    display: none;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 1rem;
    background: #FED402;
    color: #002B58;
    border: 1px solid rgba(0, 43, 88, 0.14);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.content-notice-banner.show {
    display: block;
    animation: contentNoticeFadeIn 0.24s ease-out;
}

.content-notice-banner.hide {
    display: none;
}

@keyframes contentNoticeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-notice-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem clamp(3.5rem, 6vw, 4.5rem);
    min-height: 3.5rem;
}

.content-notice-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.content-notice-icon {
    font-size: 1.25rem;
    color: #002B58;
    flex-shrink: 0;
}

.content-notice-message {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #002B58;
    font-weight: 500;
    text-align: center;
}

.content-notice-link {
    color: #002B58;
    text-decoration: underline;
    font-weight: 700;
    white-space: nowrap;
    margin-left: 0.25rem;
}

.content-notice-link:hover {
    opacity: 0.8;
}

.content-notice-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #002B58;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.content-notice-close:hover {
    opacity: 1;
}

.content-notice-close:focus-visible {
    outline: 2px solid #002B58;
    outline-offset: -2px;
}

@media (max-width: 768px) {
    .content-notice-banner {
        margin-bottom: 0.75rem;
    }

    .content-notice-content {
        padding: 0.625rem 3rem;
        min-height: 3rem;
    }

    .content-notice-message {
        font-size: 0.8125rem;
    }

    .content-notice-icon {
        font-size: 1.125rem;
    }
}

/* ================================
   COOKIE NOTICE BANNER
   ================================ */

.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: #002B58;
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-notice.show {
    transform: translateY(0);
}

.cookie-notice.hide {
    transform: translateY(100%);
}

.cookie-notice-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-notice-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.cookie-notice-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-notice-link:hover {
    color: #fff;
    text-decoration-thickness: 2px;
}

.cookie-notice-ok {
    flex-shrink: 0;
    padding: 0.375rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cookie-notice-ok:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

.cookie-notice-ok:focus-visible {
    outline: 2px solid #fff;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-notice {
        transition: none;
    }
}

@media (max-width: 768px) {
    .cookie-notice-inner {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
        text-align: center;
    }

    .cookie-notice-ok {
        width: 100%;
        padding: 0.5rem 1.25rem;
    }
}

/* ================================
   FEEDBACK FORM SIDEBAR
   ================================ */

.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.feedback-overlay.active {
    opacity: 1;
    visibility: visible;
}

.feedback-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 550px;
    max-width: 100%;
    background: #F7F7F7;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
}

.feedback-sidebar.active {
    transform: translateX(0);
}

.feedback-sidebar-header {
    background: #F7F7F7;
    color: #002B58;
    padding: 1.75rem 2rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.feedback-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #002B58;
    line-height: 1.2;
}

.feedback-close {
    background: transparent;
    border: none;
    color: #002B58;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
    margin-top: -0.25rem;
}

.feedback-close:hover {
    opacity: 1;
    background: rgba(0, 43, 88, 0.05);
}

.feedback-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem 2rem 2rem;
}

.feedback-intro {
    font-size: 1rem;
    color: #666;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Honeypot field (hidden) */
.feedback-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.feedback-question {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.feedback-label {
    font-size: 1rem;
    font-weight: 600;
    color: #002B58;
    line-height: 1.5;
}

.optional-label {
    font-weight: 400;
    color: #767676;
    font-size: 0.875rem;
}

.feedback-select,
.feedback-input,
.feedback-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    color: #333;
    background: white;
    border: 1px solid #767676;
    border-radius: 0;
    transition: all 0.2s ease;
}

.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: #0268BB;
    box-shadow: 0 0 0 3px rgba(2, 104, 187, 0.08);
}

.feedback-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.feedback-hint {
    font-size: 0.875rem;
    color: #767676;
    margin: 0.5rem 0 0;
    line-height: 1.5;
}

/* Rating Scale Indicator */
.rating-scale-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.scale-label-left,
.scale-label-right {
    font-size: 0.75rem;
    color: #767676;
    white-space: nowrap;
}

.scale-line {
    flex: 1;
    height: 1px;
    background: #E5E5E5;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 0.5rem;
}

.star-btn {
    flex: 1;
    background: white;
    border: 2px solid #E5E5E5;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    color: #767676;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-btn:hover {
    border-color: #FED402;
    background: #FFFBF0;
}

.star-btn:hover i {
    color: #FED402;
}

.star-btn.hover-active i {
    color: #FED402;
}

.star-btn.selected {
    border-color: #FED402;
    background: white;
}

.star-btn.selected i {
    color: #FED402;
}

.star-btn.hover-active {
    border-color: #FED402;
}

.star-btn i {
    font-size: 1.5rem;
}

/* Feature Grid */
.feature-grid {
    display: flex;
    gap: 0.5rem;
}

.feature-btn {
    flex: 1;
    background: white;
    border: 2px solid #E5E5E5;
    padding: 0.875rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    color: #666;
}

.feature-btn i {
    font-size: 1.5rem;
    color: #0268BB;
    transition: all 0.2s ease;
}

.feature-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.feature-btn:hover {
    border-color: #0268BB;
    background: #F7F9FC;
    color: #002B58;
}

.feature-btn.selected {
    border-color: #FED402;
    background: white;
    color: #002B58;
}

.feature-btn.selected i {
    color: #FED402;
}

.feedback-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #002B58;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    width: 100%;
}

.feedback-submit:hover {
    background: #003d7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 43, 88, 0.3);
}

.feedback-submit:active {
    transform: translateY(0);
}

.feedback-submit i {
    font-size: 1rem;
    margin-top: -2px;
}

/* Responsive Feedback Sidebar */
@media (max-width: 768px) {
    .feedback-sidebar {
        width: 100%;
    }

    .feedback-sidebar-header {
        padding: 1.5rem 1.25rem 1rem;
    }

    .feedback-title {
        font-size: 1.25rem;
    }

    .feedback-sidebar-content {
        padding: 1.5rem 1.25rem 1.5rem;
    }

    .feedback-form {
        gap: 1.25rem;
    }

    .feedback-intro {
        margin-bottom: 1.25rem;
        font-size: 0.875rem;
    }

    .feedback-question {
        gap: 0.5rem;
    }

    .star-btn {
        padding: 0.75rem 0.625rem;
    }

    .star-btn i {
        font-size: 1.375rem;
    }

    .feature-grid {
        flex-wrap: wrap;
    }

    .feature-btn {
        flex: 1 1 calc(33.333% - 0.375rem);
        min-width: calc(33.333% - 0.375rem);
        padding: 0.75rem 0.375rem;
    }

    .feature-btn i {
        font-size: 1.375rem;
    }

    .feature-btn span {
        font-size: 0.75rem;
    }
}

/* Responsive Beta Banner */
@media (max-width: 768px) {
    .beta-banner {
        padding: 1rem 1rem 0.75rem;
        padding-right: 3rem;
    }

    .beta-banner-content {
        flex-wrap: wrap;
        gap: 1rem;
        position: relative;
    }

    .beta-banner-text {
        width: 100%;
        order: 1;
        gap: 0.75rem;
    }

    .beta-info-icon {
        font-size: 1.25rem;
    }

    .beta-message {
        font-size: 0.875rem;
        line-height: 1.5;
        width: 100%;
    }

    .beta-feedback-link {
        order: 2;
        width: 100%;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.625rem 1.25rem;
        line-height: 1;
    }

    .beta-banner-close {
        order: 0;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    border-radius: 0;
}

.nav-link:hover {
    background-color: rgba(254, 212, 2, 0.1);
    color: #FED402;
}

.nav-link:focus-visible {
    outline: 3px solid #FED402;
}

/* Header Search — fills space between logo and nav */
.header-search-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 500px;
    margin: 0 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    transition: background-color 0.15s, border-color 0.15s;
}

.header-search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    outline: none;
    caret-color: white;
    min-width: 0;
}

.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.header-search-input:focus-visible {
    background-color: transparent;
    padding-left: 0.75rem;
}

.header-search-input:-webkit-autofill,
.header-search-input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 43, 88, 0.99) inset;
}

.header-search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.header-search-btn:hover {
    color: white;
}

@media (max-width: 768px) {
    .header-search-wrapper {
        display: none;
    }
}

.nav-beta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    border: none;
    margin: 0 0.5rem;
}

.nav-beta-badge i {
    font-size: 0.75rem;
    color: white;
}

/* Header Section */
.page-header {
    background: #ffffff;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

.page-header .page-title,
.page-header .page-subtitle,
.page-header .header-divider {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    font-size: 3rem;
    font-weight: 600;
    color: #002B58;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #666666;
    font-weight: 400;
    margin-bottom: 0;
}

.header-divider {
    border: none;
    border-top: 1px solid #E5E5E5;
    margin: 2rem 0 0;
}

/* Main Content Section */
.main-content {
    background: #ffffff;
    padding: 0 1.5rem 0;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* ================================
   MULTI-MODAL SEARCH BAR
   ================================ */

.multimodal-search-wrapper {
    padding: 2rem 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* ================================
   UNIFIED SEARCHBOX
   ================================ */

.unified-searchbox {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

.unified-searchbox[data-position="landing"] {
    padding: 2rem 0;
}

.unified-searchbox[data-position="results"] {
    padding: 1.5rem 0;
    background: #ffffff;
    margin-top: 2rem;
}

.unified-searchbox[data-position="keywords"] {
    background: #ffffff;
    padding: 0.5rem 0 0;
    margin-top: 0;
}

.unified-searchbox[data-position="results"] .multimodal-search-bar {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ================================
   SUGGESTED SEARCHES
   ================================ */

.suggested-searches {
    width: 100%;
    padding: 0.5rem 0 1.5rem;
}

.suggested-searches-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    margin: 0 0 0.75rem;
    letter-spacing: 0.02em;
}

.suggested-searches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.suggested-search-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 0;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
}

.suggested-search-card:hover {
    background: #F7F7F7;
    border-color: #D9D9D9;
}

.suggested-search-card:focus-visible {
    outline: 2px solid #002B58;
    outline-offset: 2px;
}

.suggested-search-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggested-search-header strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: #444;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.suggested-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.25rem;
}

.suggested-search-example {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
    transition: color 0.2s;
}

.suggested-search-card:hover .suggested-search-example {
    color: #002B58;
}

.suggested-search-card:hover .suggested-search-icon {
    color: #FED402;
}

.semantic-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.semantic-tooltip-icon {
    font-size: 0.85em;
    opacity: 0.5;
    cursor: help;
    vertical-align: middle;
}

.semantic-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #002B58;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
    width: 280px;
    white-space: normal;
    z-index: 10;
    pointer-events: none;
    text-transform: none;
}

.semantic-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #002B58;
}

.semantic-tooltip-wrapper:hover .semantic-tooltip {
    display: block;
}

.suggested-search-example em {
    font-style: normal;
    color: #aaa;
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.35;
}

/* Hide when search is active */
.suggested-searches.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 900px) {
    .suggested-searches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .suggested-searches-grid {
        grid-template-columns: 1fr;
    }
    .suggested-search-card {
        padding: 0.85rem;
    }
}

/* Search History Dropdown */
.search-history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #E5E5E5;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 101;
    max-height: 400px;
    overflow-y: auto;
}

.search-history-list {
    padding: 0.5rem 0;
}

.search-history-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 0.75rem;
}

.search-history-item:hover {
    background: #F7F7F7;
}

.search-history-item i {
    color: #767676;
    font-size: 1rem;
    flex-shrink: 0;
}

.search-history-item-query {
    flex: 1;
    font-size: 1rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-history-item-type {
    font-size: 0.75rem;
    color: #767676;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.search-history-item-remove {
    opacity: 0;
    background: none;
    border: none;
    color: #767676;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.search-history-item:hover .search-history-item-remove {
    opacity: 1;
}

.search-history-item-remove:hover {
    color: #A00000;
}

.search-history-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: #F7F7F7;
    border: none;
    border-top: 1px solid #E5E5E5;
    color: #666;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.search-history-clear:hover {
    background: #EEEEEE;
    color: #A00000;
}

.search-history-clear i {
    font-size: 1rem;
}

.search-history-empty {
    padding: 1.5rem;
    text-align: center;
    color: #767676;
    font-size: 0.875rem;
}

/* Position relative for dropdown positioning */
.unified-searchbox {
    position: relative;
}

/* Image Preview */
.image-preview-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: white;
    border: 2px solid #E5E5E5;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-preview-container img {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    border: 1px solid #E5E5E5;
}

.remove-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #002B58;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.125rem;
}

.remove-image-btn:hover {
    background: #003d7a;
    transform: scale(1.1);
}

.remove-image-btn i {
    line-height: 1;
}

.multimodal-search-bar {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 2px solid #E5E5E5;
    border-radius: 0;
    padding: 0.375rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    max-width: none;
    width: 100%;
    gap: 0.75rem;
}

.multimodal-search-bar:hover {
    border-color: #767676;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.multimodal-search-bar:focus-within {
    border-color: #767676;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Search Icon */
.search-icon {
    color: #767676;
    font-size: 1.25rem;
    padding-left: 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

/* Right Icons */
.search-right-icons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.5rem;
}

.search-icon-action {
    background: transparent;
    border: none;
    color: #808080;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-action:hover {
    background: #F0F2F5;
    color: #002B58;
}

.search-icon-action:active {
    background: #E5E7EB;
    transform: scale(0.95);
}

/* Listening state for mic button */
.search-icon-action.listening {
    background: #FFE5E5;
    color: #DC2626;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Search Submit Button */
.search-submit-btn {
    background: #002B58;
    border: none;
    border-radius: 0;
    color: white;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    position: relative;
}

.search-submit-btn:hover {
    background: #003d7a;
}

.search-submit-btn:focus-visible {
    outline: 3px solid #FED402;
}

.search-submit-btn:active {
    transform: scale(0.95);
}

.search-submit-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

.search-submit-btn .search-loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.search-submit-btn.loading i {
    display: none;
}

.search-submit-btn.loading .search-loading-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Permission Message Modal */
.permission-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.permission-content {
    background: white;
    padding: 2rem;
    max-width: 500px;
    margin: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.permission-content i {
    font-size: 3rem;
    color: #DC2626;
    margin-bottom: 1rem;
}

.permission-content h3 {
    font-size: 1.5rem;
    color: #002B58;
    margin: 0 0 1rem;
}

.permission-content p {
    color: #666;
    margin: 0 0 1rem;
    line-height: 1.6;
}

.permission-content ol {
    text-align: left;
    color: #333;
    line-height: 1.8;
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.permission-content ol li {
    margin: 0.5rem 0;
}

.permission-close {
    background: #002B58;
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.permission-close:hover {
    background: #003d7a;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Feedback Success Modal */
.feedback-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.feedback-success-modal.show {
    opacity: 1;
    visibility: visible;
}

.feedback-success-content {
    background: white;
    padding: 2.5rem 2rem 2rem;
    max-width: 440px;
    width: 90%;
    margin: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.success-icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon-circle i {
    font-size: 3rem;
    color: white;
    animation: checkmark 0.6s ease 0.4s backwards;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.feedback-success-content h3 {
    font-size: 1.75rem;
    color: #002B58;
    margin: 0 0 1rem;
    font-weight: 700;
}

.feedback-success-content p {
    color: #666;
    margin: 0 0 2rem;
    line-height: 1.6;
    font-size: 1rem;
}

.success-close-btn {
    background: #002B58;
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
}

.success-close-btn:hover {
    background: #003d7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 43, 88, 0.3);
}

.success-close-btn:active {
    transform: translateY(0);
}

/* Input */
.multimodal-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    color: #333;
    outline: none;
    padding: 0.75rem 1rem 0.75rem 0;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    vertical-align: middle;
}

.multimodal-input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.multimodal-input:focus-visible {
    background-color: #E8F4FF;
}

.multimodal-input::placeholder {
    color: #767676;
    font-weight: 400;
    line-height: 1.5;
    vertical-align: middle;
}

/* Voice Action Button */
.voice-action-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-action-button:hover {
    background: #F0F2F5;
}

.voice-action-button:active {
    background: #E5E7EB;
    transform: scale(0.95);
}

.voice-action-button svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .multimodal-search-wrapper {
        padding: 2rem 1rem;
    }

    .multimodal-search-bar {
        border-radius: 0;
        padding: 0.625rem 0.75rem;
    }

    .search-right-icons {
        gap: 0;
    }

    .search-icon-action {
        font-size: 1.125rem;
        padding: 0.4rem;
    }

    .multimodal-input {
        font-size: 1rem;
        padding: 0.625rem 0.75rem 0.625rem 0.5rem;
        line-height: 1.5;
    }
}

/* Hide less essential icons on small mobile screens */
@media (max-width: 480px) {
    #attachFileBtn {
        display: none;
    }

    .search-submit-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .multimodal-search-bar {
        padding: 0.5rem;
    }

    .search-right-icons {
        gap: 0.25rem;
    }
}

/* Voice UI */
.voice-ui {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 2rem;
}

.voice-ui.active {
    display: flex;
}

.voice-wave-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: 80px;
}

.voice-wave-bar {
    width: 4px;
    background: #002B58;
    transform-origin: center;
    transition: background 0.3s;
}

.voice-wave-bar:nth-child(1) { height: 20px; }
.voice-wave-bar:nth-child(2) { height: 35px; }
.voice-wave-bar:nth-child(3) { height: 50px; }
.voice-wave-bar:nth-child(4) { height: 65px; }
.voice-wave-bar:nth-child(5) { height: 80px; }
.voice-wave-bar:nth-child(6) { height: 70px; }
.voice-wave-bar:nth-child(7) { height: 55px; }
.voice-wave-bar:nth-child(8) { height: 45px; }
.voice-wave-bar:nth-child(9) { height: 60px; }
.voice-wave-bar:nth-child(10) { height: 75px; }
.voice-wave-bar:nth-child(11) { height: 55px; }
.voice-wave-bar:nth-child(12) { height: 40px; }
.voice-wave-bar:nth-child(13) { height: 30px; }

/* Animated state */
.voice-wave-container.recording .voice-wave-bar {
    animation: wave 1.2s ease-in-out infinite;
}

.voice-wave-container.recording .voice-wave-bar:nth-child(1) { animation-delay: 0s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(5) { animation-delay: 0.4s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(6) { animation-delay: 0.5s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(7) { animation-delay: 0.6s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(8) { animation-delay: 0.7s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(9) { animation-delay: 0.8s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(10) { animation-delay: 0.9s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(11) { animation-delay: 1s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(12) { animation-delay: 1.1s; }
.voice-wave-container.recording .voice-wave-bar:nth-child(13) { animation-delay: 0.2s; }

@keyframes wave {
    0%, 100% {
        transform: scaleY(0.3);
    }
    50% {
        transform: scaleY(1);
    }
}

.voice-status {
    font-size: 1.125rem;
    color: #002B58;
    font-weight: 500;
}

.voice-record-button {
    background: #FED402;
    color: #002B58;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.voice-record-button:hover {
    background: #FCB900;
}

.voice-record-button:active {
    background: #e5a500;
}

.voice-hint {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.75rem;
}

/* Loading Spinner */
.voice-loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 4px solid #E5E5E5;
    border-top: 4px solid #002B58;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.voice-loading-spinner.active {
    display: block;
}

/* Voice Conversation UI */
.voice-conversation {
    display: none;
    max-width: 700px;
    margin: 2rem auto 0;
    animation: fadeInUp 0.4s ease-out;
}

.voice-conversation.active {
    display: block;
}

.voice-transcript {
    margin-bottom: 2rem;
}

.voice-transcript-item {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.voice-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-label i {
    font-size: 0.875rem;
}

.voice-label.user-label {
    color: #002B58;
}

.voice-label.ai-label {
    color: #0268BB;
}

.voice-text {
    background: white;
    padding: 1.25rem 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.voice-text.user-text {
    border-left: 4px solid #002B58;
}

.voice-text.ai-text {
    border-left: 4px solid #0268BB;
}

.voice-sources {
    margin-top: 1.5rem;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 0.875rem;
}

.voice-sources-title {
    font-weight: 400;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.voice-source-link {
    color: #666;
    text-decoration: none;
    display: block;
    margin: 0.25rem 0;
    padding-left: 0;
    font-size: 0.875rem;
}

.voice-source-link:hover {
    color: #002B58;
}

.voice-suggested-resources {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #F7F7F7;
    border-left: 3px solid #FED402;
    font-size: 1rem;
}

.voice-suggested-resources-title {
    font-weight: 600;
    color: #002B58;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-suggested-resource-link {
    color: #0268BB;
    text-decoration: none;
    display: block;
    margin: 0.375rem 0;
    padding-left: 1rem;
}

.voice-suggested-resource-link:hover {
    text-decoration: underline;
}

.voice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.voice-action-btn {
    background: transparent;
    border: 2px solid #E5E5E5;
    color: #666;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-action-btn:hover {
    border-color: #002B58;
    color: #002B58;
}

.voice-action-btn.primary {
    background: #FED402;
    border-color: #FED402;
    color: #002B58;
    font-weight: 600;
}

.voice-action-btn.primary:hover {
    background: #FCB900;
    border-color: #FCB900;
}

/* Image Upload UI */
.image-upload-ui {
    display: none;
}

.image-upload-ui.active {
    display: block;
}

.upload-area {
    border: 2px dashed #767676;
    background: #F7F7F7;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #002B58;
    background: #ffffff;
}

.upload-icon {
    font-size: 3rem;
    color: #767676;
    margin-bottom: 1rem;
}

.upload-area:hover .upload-icon {
    color: #002B58;
}

.upload-button {
    background: #002B58;
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.upload-button:hover {
    background: #003d7a;
}

.upload-text {
    font-size: 1.125rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.875rem;
    color: #666;
}

/* Image Upload Result */
.image-upload-result {
    display: none;
    max-width: 700px;
    margin: 2rem auto;
    animation: fadeInUp 0.4s ease-out;
}

.image-upload-result.active {
    display: block;
}

.uploaded-image-preview {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
    border: 2px solid #E5E5E5;
}

.uploaded-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.image-analysis {
    background: white;
    padding: 1.5rem;
    border-left: 4px solid #0268BB;
    margin-bottom: 1.5rem;
}

.image-analysis-title {
    font-size: 1rem;
    font-weight: 600;
    color: #002B58;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-analysis-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.image-results-sources {
    padding: 1rem 1.25rem;
    background: #F7F7F7;
    border-left: 3px solid #FED402;
    font-size: 0.875rem;
}

.image-results-sources-title {
    font-weight: 600;
    color: #002B58;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-source-link {
    color: #0268BB;
    text-decoration: none;
    display: block;
    margin: 0.375rem 0;
    padding-left: 1rem;
}

.image-source-link:hover {
    text-decoration: underline;
}

.upload-another-btn {
    background: #FED402;
    color: #002B58;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 2rem auto 0;
}

.upload-another-btn:hover {
    background: #FCB900;
}

.image-upload-loading {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.image-upload-loading.active {
    display: block;
}

.image-loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #E5E5E5;
    border-top: 5px solid #002B58;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.image-loading-text {
    font-size: 1.125rem;
    color: #002B58;
    font-weight: 500;
}

/* Hide/Show based on mode */
.search-input-container.hidden {
    display: none;
}

/* In Focus Section */
.in-focus-section {
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto 0;
    padding: 0 1.5rem 80px;
    background: transparent;
    box-sizing: border-box;
}

.in-focus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.in-focus-title {
    font-size: 2rem;
    font-weight: 700;
    color: #002B58;
    margin: 0;
}

.in-focus-cta {
    background: #002B58;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.875rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.in-focus-cta:hover {
    background: #003d7a;
    gap: 0.75rem;
}

.in-focus-cta i {
    vertical-align: middle;
    margin-top: -2px;
}

.in-focus-grid {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.25rem;
    max-height: 50vh;
}

.in-focus-item {
    position: relative;
    display: block;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.in-focus-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

.in-focus-item:hover::before {
    background: rgba(0, 0, 0, 0.4);
}

.in-focus-item:first-child {
    grid-row: 1 / 3;
    grid-column: 1;
}

.in-focus-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.in-focus-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.in-focus-item:hover img {
    transform: scale(1.05);
}

.in-focus-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 43, 88, 0.95) 0%, rgba(0, 43, 88, 0.7) 50%, transparent 100%);
    padding: 2.5rem 1.25rem 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.in-focus-item:hover .in-focus-overlay {
    background: linear-gradient(to top, rgba(0, 43, 88, 1) 0%, rgba(0, 43, 88, 0.85) 60%, transparent 100%);
}

.in-focus-card-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.in-focus-item:first-child .in-focus-card-title {
    font-size: 1.5rem;
}

.in-focus-arrow {
    color: #FED402;
    font-size: 1.25rem;
    line-height: 1;
    vertical-align: middle;
    margin-top: -2px;
}

/* Collections Section */
.collections-section {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 80px;
    background: transparent;
    box-sizing: border-box;
}

.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.collections-title {
    font-size: 2rem;
    font-weight: 700;
    color: #002B58;
    margin: 0;
}

.collections-cta {
    background: #002B58;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.875rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.collections-cta:hover {
    background: #003d7a;
    gap: 0.75rem;
}

.collections-cta i {
    vertical-align: middle;
    margin-top: -2px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.collections-item {
    position: relative;
    display: block;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.collections-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

.collections-item:hover::before {
    background: rgba(0, 0, 0, 0.4);
}

.collections-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.collections-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.collections-item:hover img {
    transform: scale(1.03);
}

.collections-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 43, 88, 0.95) 0%, rgba(0, 43, 88, 0.7) 50%, transparent 100%);
    padding: 2.5rem 1.25rem 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.collections-item:hover .collections-overlay {
    background: linear-gradient(to top, rgba(0, 43, 88, 1) 0%, rgba(0, 43, 88, 0.85) 60%, transparent 100%);
}

.collections-card-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.collections-arrow {
    color: #FED402;
    font-size: 1.25rem;
    line-height: 1;
    vertical-align: middle;
    margin-top: -2px;
}

/* ================================
   VOICE CHAT INTERFACE
   ================================ */

.voice-chat-container {
    display: none;
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    border: 2px solid #E5E5E5;
    min-height: 450px;
    flex-direction: column;
    animation: fadeInUp 0.4s ease-out;
}

.voice-chat-container.active {
    display: flex;
}

/* Voice Chat Header */
.voice-chat-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #E5E5E5;
    background: #F7F7F7;
    gap: 1rem;
}

.voice-chat-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.voice-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.voice-chat-header-info {
    flex: 1;
}

.voice-chat-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #002B58;
}

.voice-chat-status {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #0268BB;
}

/* Voice Chat Header Actions */
.voice-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-captions-toggle {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-captions-toggle:hover {
    color: #0268BB;
    background: #E8F4FD;
}

.voice-captions-toggle[aria-pressed="true"] {
    color: #0268BB;
    background: #E8F4FD;
}

.voice-captions-toggle:focus-visible {
    outline: 2px solid #0268BB;
}

.voice-chat-close {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-chat-close:hover {
    color: #DC2626;
    background: #FFE5E5;
}

.voice-chat-close:focus-visible {
    outline: 2px solid #DC2626;
}

/* Screen Reader Only - Visually Hidden */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Live Captions Container */
.voice-captions-container {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.75rem 1rem;
    margin: 0 1rem;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    transition: opacity 0.2s ease;
}

.voice-captions-container[hidden] {
    display: none;
}

.voice-captions-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.captions-label {
    background: #DC2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.voice-captions-text {
    margin: 0;
    flex: 1;
    font-family: inherit;
}

.voice-captions-text:empty::before {
    content: 'Waiting for speech...';
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Real-time Transcript Display */
.realtime-transcript {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    min-height: 2.5rem;
    height: 2.5rem; /* Fixed height to prevent layout shift */
    text-align: center;
    transition: opacity 0.2s ease;
    flex-shrink: 0; /* Prevent shrinking */
    width: 100%;
    max-width: 600px;
}

.realtime-transcript:empty {
    /* Use visibility instead of display to preserve layout space */
    visibility: hidden;
    opacity: 0;
}

.realtime-transcript .interim {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.realtime-transcript .final {
    color: #fff;
    font-weight: 500;
}

/* Voice Chat Messages */
.voice-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #FAFAFA;
}

.voice-message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.3s ease-out;
}

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

/* Assistant Message */
.assistant-message {
    align-self: flex-start;
    max-width: 80%;
}

.voice-message-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: white;
    border: 2px solid #E5E5E5;
    padding: 0.25rem;
}

.voice-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.voice-message-content {
    flex: 1;
}

.voice-message-text {
    background: white;
    padding: 1rem 1.25rem;
    border-left: 3px solid #0268BB;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* User Message */
.user-message {
    align-self: flex-end;
    max-width: 80%;
}

.user-message .voice-message-content {
    display: flex;
    justify-content: flex-end;
}

.user-message .voice-message-text {
    background: #0268BB;
    color: white;
    border-left: none;
    border-right: 3px solid #002B58;
    box-shadow: 0 2px 4px rgba(2, 104, 187, 0.2);
}

/* Voice Recording Indicator */
.voice-recording-indicator {
    display: none;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    height: 400px; /* Fixed height to prevent layout shift */
    min-height: 400px;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.voice-recording-indicator.active {
    display: flex;
    background: #03061e; /* Dark navy background */
}

/* Background Video */
.orb-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: auto;
    z-index: 1;
    object-fit: contain;
    display: block;
    pointer-events: none;
    /* Dimmed by default - waiting for speech */
    opacity: 0.5;
    filter: drop-shadow(0 0 0px transparent);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.15s ease;
}

/* Active/speaking state - full opacity with pulse */
.orb-background-video.speaking {
    opacity: 1;
    animation: orbPulse 0.6s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Recording Content (appears on top of video) */
.recording-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    background: transparent;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0; /* Prevent shrinking */
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #DC2626;
    border-radius: 50%;
    animation: recordingPulse 1.5s ease-in-out infinite;
    flex-shrink: 0; /* Prevent shrinking */
}

.recording-dot.hidden {
    visibility: hidden;
    opacity: 0;
}

@keyframes recordingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.recording-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Wave Canvas Visualizer */
#waveCanvas {
    display: block;
    width: 100%;
    max-width: 800px;
    height: 200px; /* Fixed height */
    flex-shrink: 0; /* Prevent shrinking */
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    background: transparent;
}

.recording-hint {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-style: italic;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    flex-shrink: 0; /* Prevent shrinking */
}

/* Voice Chat Input */
.voice-chat-input-wrapper {
    padding: 1.5rem;
    border-top: 2px solid #E5E5E5;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.voice-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #002B58;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.voice-continue-btn:hover {
    background: #003d7a;
}

.voice-continue-btn:active {
    background: #001f3f;
    transform: scale(0.98);
}

/* Hide icon wrapper */
.voice-continue-btn .icon-wrapper {
    display: none;
}

.voice-continue-btn.recording {
    background: #003d7a;
}

.voice-continue-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.voice-continue-primary {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.voice-continue-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.voice-chat-send-btn:active {
    transform: scale(0.95);
}

/* Responsive Voice Chat */
@media (max-width: 768px) {
    .voice-chat-container {
        margin: 1rem;
        min-height: 400px;
    }

    .voice-chat-header {
        padding: 1rem;
    }

    .voice-chat-messages {
        padding: 1rem;
    }

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

    .assistant-message,
    .user-message {
        max-width: 90%;
    }

    .voice-chat-input-wrapper {
        padding: 1rem;
    }
}

/* Conversational Chat UI */
.chat-container {
    display: none;
    max-width: 900px;
    margin: 2rem auto 4rem;
    animation: fadeInUp 0.4s ease-out;
    position: relative;
    z-index: 10;
}

.chat-container.active {
    display: block;
}

/* Search Query Display */
.search-query-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #F7F7F7;
    border-left: 4px solid #002B58;
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: #002B58;
}

.search-query-display i {
    font-size: 1.25rem;
    color: #0268BB;
}

/* AI Summary Card */
.ai-summary-card {
    background: white;
    border: 1px solid #E5E5E5;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ai-avatar-small {
    width: 28px;
    height: 28px;
}

.ai-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0268BB;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-summary-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #333;
}

.ai-summary-content p {
    margin-bottom: 1rem;
}

.ai-summary-content .ai-summary-lead {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.ai-summary-content p:last-child {
    margin-bottom: 0;
}

.ai-summary-content strong {
    color: #002B58;
    font-weight: 600;
}

.read-more-link,
.read-less-link {
    color: #0066CC;
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
    cursor: pointer;
}

.read-more-link:hover,
.read-less-link:hover {
    text-decoration: underline;
    color: #004499;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.quick-stat-card {
    background: white;
    border: 1px solid #E5E5E5;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.quick-stat-card:hover {
    border-color: #0268BB;
    box-shadow: 0 4px 12px rgba(2, 104, 187, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    color: #0268BB;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #002B58;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #002B58;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E5E5E5;
}

/* Visualizations Section */
.visualizations-section {
    margin-bottom: 2.5rem;
}

.viz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.viz-card {
    background: white;
    border: 1px solid #E5E5E5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viz-header {
    padding: 1rem 1.25rem;
    background: #F7F7F7;
    font-weight: 600;
    color: #002B58;
    font-size: 1rem;
    border-bottom: 1px solid #E5E5E5;
}

.viz-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.viz-footer {
    padding: 1rem 1.25rem;
    background: #FAFAFA;
    border-top: 1px solid #E5E5E5;
}

.viz-insight {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

/* Vertical Bar Chart */
.vertical-bar-chart {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 0.5rem;
    padding: 0 0.5rem;
    border-bottom: 2px solid #333;
    position: relative;
}

.vertical-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.vertical-bar {
    width: 100%;
    max-width: 50px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.bar-color-1 {
    background: #0268BB;
}

.bar-color-2 {
    background: #002B58;
}

.bar-color-3 {
    background: #FED402;
}

.bar-color-4 {
    background: #0268BB;
}

.bar-color-5 {
    background: #002B58;
}

.bar-color-6 {
    background: #FCB900;
}

.vertical-bar-group:hover .vertical-bar {
    opacity: 0.8;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.vertical-bar-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    text-align: center;
}

/* Pie Chart */
.pie-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.pie-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        #0268BB 0deg 137deg,
        #FED402 137deg 223deg,
        #002B58 223deg 288deg,
        #767676 288deg 360deg
    );
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pie-legend-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.legend-color {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-color-blue { background: #0268BB; }
.legend-color-gold { background: #FED402; }
.legend-color-navy { background: #002B58; }
.legend-color-gray { background: #767676; }

/* Modern Bar Chart */
.bar-chart-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bar-name {
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
}

.bar-value {
    font-size: 0.875rem;
    color: #0268BB;
    font-weight: 600;
}

.bar-track {
    width: 100%;
    height: 8px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0268BB 0%, #002B58 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Featured Documents */
.featured-documents-section {
    margin-bottom: 3rem;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: white;
    border: 1px solid #E5E5E5;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.document-card:hover {
    border-color: #0268BB;
    box-shadow: 0 4px 16px rgba(2, 104, 187, 0.1);
    transform: translateY(-2px);
}

.document-badge {
    display: inline-block;
    background: #0268BB;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.document-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #002B58;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.document-preview {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.document-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #767676;
}

.document-meta i {
    margin-right: 0.375rem;
}

.document-date,
.document-pages {
    display: flex;
    align-items: center;
}

/* Related Collections */
.related-collections-section {
    margin-bottom: 2.5rem;
}

.collections-scroll {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.collection-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #E5E5E5;
    text-decoration: none;
    color: #002B58;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.collection-chip:hover {
    border-color: #0268BB;
    background: #F7F7F7;
    color: #0268BB;
}

.collection-chip i {
    font-size: 1.125rem;
}

/* Sources Section */
.sources-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #F7F7F7;
    border-left: 3px solid #0268BB;
}

.sources-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #002B58;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.sources-header i {
    font-size: 1.125rem;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0268BB;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.source-item:hover {
    color: #002B58;
    text-decoration: underline;
}

.source-item i {
    font-size: 1rem;
}

/* Follow-up Suggestions */
.followup-suggestions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.suggestion-chip {
    background: white;
    border: 1px solid #E5E5E5;
    color: #666;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-chip:hover {
    border-color: #002B58;
    color: #002B58;
    background: #F7F7F7;
}

.suggestion-chip i {
    font-size: 0.875rem;
    vertical-align: middle;
    margin-top: -2px;
}

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

.nav-link img.user-avatar-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-default {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.nav-link-avatar:hover {
    background-color: transparent;
    color: inherit;
}

/* ============================================
   User Avatar Popover System
   ============================================ */

/* Avatar wrapper — positions the popover relative to the trigger */
.user-avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Avatar trigger button reset */
.user-avatar-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease;
}

.user-avatar-trigger:hover {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.user-avatar-trigger:focus-visible {
    outline: 2px solid #C5A030;
}

/* Initials avatar (shown when authenticated) */
.user-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0268BB;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.02em;
}

/* Popover panel */
.user-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 480px;
    background: #fff;
    border-radius: 0;
    border-top: 3px solid #FED402;
    box-shadow: 0 4px 12px rgba(0, 43, 88, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transform-origin: top right;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    pointer-events: none;
}

.user-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Popover header */
.user-popover-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #002B58;
    position: relative;
}

.user-popover-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FED402;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.user-popover-info {
    flex: 1;
    min-width: 0;
}

.user-popover-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-popover-email {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-popover-profile-link {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #FED402;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.user-popover-profile-link:hover {
    color: #FFE84D;
    text-decoration: underline;
}

/* Role badge */
.user-popover-badge {
    display: none;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 0;
    white-space: nowrap;
    line-height: 1.4;
}

.user-popover-badge[data-tier="admin"] {
    display: inline-block;
    background: #FED402;
    color: #002B58;
}

.user-popover-badge[data-tier="restricted"] {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-popover-badge[data-tier="public"] {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Divider */
.user-popover-divider {
    height: 1px;
    background: #E5E5E5;
    margin: 0;
}

/* Menu items */
.user-popover-menu {
    padding: 0;
}

.user-popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #F0F0F0;
    font-size: 0.8125rem;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-align: left;
}

.user-popover-item:last-child {
    border-bottom: none;
}

.user-popover-item:hover {
    background: rgba(0, 43, 88, 0.04);
}

.user-popover-item:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: -2px;
}

.user-popover-item i {
    font-size: 1rem;
    color: #002B58;
    width: 20px;
    text-align: center;
    opacity: 0.5;
}

.user-popover-item:hover i {
    opacity: 0.8;
}

/* Section label inside menu */
.user-popover-section-label {
    display: block;
    padding: 8px 16px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #767676;
}

/* Sign out button */
.user-popover-signout {
    color: #002B58;
}

.user-popover-signout:hover {
    background: rgba(0, 43, 88, 0.04);
}

.user-popover-signout i {
    color: #002B58;
    opacity: 0.5;
}

/* Session info */
.user-popover-session {
    padding: 8px 16px;
    background: #F7F7F7;
    border-top: 1px solid #E5E5E5;
}

.user-popover-session-text {
    font-size: 0.75rem;
    color: #767676;
    letter-spacing: 0.01em;
}

/* Backdrop */
.user-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
    pointer-events: none;
}

.user-popover-backdrop.visible {
    /* Backdrop stays pointer-events: none to allow clicks through to popover and inputs */
    pointer-events: none;
}

/* Mobile auth button */
.mobile-auth-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.mobile-auth-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* SR-only live region for popover announcements */
.user-popover-sr-announce {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Login form inside popover (unauthenticated state) */
.user-popover-login {
    padding: 16px;
}

.user-popover-login-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #002B58;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.user-popover-login-header i {
    font-size: 1.125rem;
    color: #002B58;
}

.user-popover-login-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.user-popover-login-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    font-size: 0.8125rem;
    border: 1px solid #767676;
    border-radius: 0;
    background: #fff;
    color: #333;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.user-popover-login-input:focus {
    border-color: #0268BB;
    box-shadow: inset 0 0 0 1px #0268BB;
}

.user-popover-login-btn {
    display: block;
    width: 100%;
    padding: 9px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #002B58;
    background: #FED402;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.15s ease;
}

.user-popover-login-btn:hover {
    background: #FCB900;
}

.user-popover-login-btn:focus-visible {
    outline: 2px solid #002B58;
}

.user-popover-login-hint {
    font-size: 0.75rem;
    color: #767676;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Dev mode email/password input fields */
.user-popover-dev-form-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    font-size: 0.875rem;
    border: 1px solid #D0D0D0;
    border-radius: 0;
    box-sizing: border-box;
    font-family: inherit;
    pointer-events: auto;
    cursor: text;
    background: #fff;
    color: #333;
}

.user-popover-dev-form-input::placeholder {
    color: #999;
}

.user-popover-dev-form-input:focus {
    outline: none;
    border-color: #0268BB;
    box-shadow: inset 0 0 0 1px #0268BB;
}

.user-popover-form-error {
    font-size: 0.8125rem;
    color: #D32F2F;
    margin-top: 6px;
    margin-bottom: 12px;
    min-height: 1.125rem;
}

/* ---- Mobile: bottom sheet ---- */
@media (max-width: 768px) {
    .user-popover {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        border-radius: 0;
        border-top: 3px solid #FED402;
        transform: translateY(100%);
        transform-origin: bottom center;
    }

    .user-popover.open {
        transform: translateY(0);
    }

    .user-popover::before {
        content: '';
        display: block;
        width: 36px;
        height: 3px;
        background: rgba(0, 43, 88, 0.15);
        border-radius: 0;
        margin: 8px auto 4px;
    }

    .user-popover-backdrop.visible {
        background: rgba(0, 43, 88, 0.6);
    }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .user-popover {
        transition: none;
    }

    .user-avatar-trigger {
        transition: none;
    }

    .user-popover-item {
        transition: none;
    }
}

/* ============================================
   Account Panel (Slide-out Drawer)
   ============================================ */

/* Backdrop */
.account-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.account-panel-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Panel container */
.account-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 600px;
    max-width: 100vw;
    background: #fff;
    border-left: 3px solid #FED402;
    box-shadow: -4px 0 16px rgba(0, 43, 88, 0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.account-panel.open {
    transform: translateX(0);
}

/* User header */
.account-panel-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #002B58;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.account-panel-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FED402;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.account-panel-header-info {
    flex: 1;
    min-width: 0;
}

.account-panel-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-panel-email {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-panel-profile-link {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #FED402;
    background: none;
    border: none;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
    text-align: left;
}

.account-panel-profile-link:hover {
    color: #FFE84D;
    text-decoration: underline;
}

.account-panel-profile-link:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: -2px;
}

.account-panel-badge {
    display: none;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 0;
    white-space: nowrap;
    line-height: 1.4;
}

.account-panel-badge[data-tier="admin"] {
    display: inline-block;
    background: #FED402;
    color: #002B58;
}

.account-panel-badge[data-tier="restricted"] {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.account-panel-badge[data-tier="public"] {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Close button */
.account-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.account-panel-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.account-panel-close:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: -2px;
}

/* Accordion */
.account-panel-accordion {
    background: #fff;
    border-bottom: 1px solid #E5E5E5;
    flex-shrink: 0;
}

.account-panel-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.account-panel-accordion.open .account-panel-accordion-content {
    max-height: 500px;
    padding: 12px 16px;
}

/* Tabs */
.account-panel-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #E5E5E5;
    flex-shrink: 0;
}

.account-panel-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: #fff;
    border: none;
    border-right: 1px solid #E5E5E5;
    color: #666;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.account-panel-tab:last-child {
    border-right: none;
}

.account-panel-tab i {
    font-size: 0.9375rem;
}

.account-panel-tab:hover {
    background: rgba(0, 43, 88, 0.04);
    color: #002B58;
}

.account-panel-tab.active {
    background: #FED402;
    color: #002B58;
}

.account-panel-tab:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: -2px;
}

/* Panel body */
.account-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.account-panel-content {
    display: none;
}

.account-panel-content.active {
    display: block;
}

/* Panel footer */
.account-panel-footer {
    border-top: 1px solid #E5E5E5;
    padding: 12px 16px;
    background: #fff;
    flex-shrink: 0;
}

.account-panel-signout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #D32F2F;
    border-radius: 0;
    color: #D32F2F;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.account-panel-signout-btn:hover {
    background: #D32F2F;
    color: #fff;
}

.account-panel-signout-btn:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: -2px;
}

.account-panel-signout-btn i {
    font-size: 1rem;
}

/* ---- Profile Tab ---- */

.account-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #002B58;
}

.account-profile-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FED402;
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.account-profile-info {
    flex: 1;
    min-width: 0;
}

.account-profile-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-profile-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-profile-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    white-space: nowrap;
    line-height: 1.4;
}

.account-profile-badge[data-tier="admin"] {
    background: #FED402;
    color: #002B58;
}

.account-profile-badge[data-tier="restricted"] {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.account-profile-badge[data-tier="public"] {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Account detail sections */
.account-detail-section {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E5E5;
}

.account-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #767676;
    margin: 0 0 10px 0;
}

/* Metadata table (scoped for panel) */
.account-panel .ap-metadata-list {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.account-panel .ap-metadata-item {
    display: table-row;
}

.account-panel .ap-metadata-label {
    display: table-cell;
    width: 140px;
    padding: 6px 10px;
    background: #F7F7F7;
    color: #002B58;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid #E5E5E5;
    vertical-align: middle;
}

.account-panel .ap-metadata-value {
    display: table-cell;
    padding: 6px 10px;
    font-size: 0.875rem;
    color: #333;
    border: 1px solid #E5E5E5;
    vertical-align: middle;
    word-break: break-word;
}

.account-tier-inline {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
}

.account-tier-inline[data-tier="admin"] {
    background: #FED402;
    color: #002B58;
}

.account-tier-inline[data-tier="restricted"] {
    background: #002B58;
    color: #fff;
}

.account-tier-inline[data-tier="public"] {
    background: #E5E5E5;
    color: #666;
}

/* Sign out button */
.account-signout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 16px 20px;
    padding: 10px;
    background: #002B58;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.account-signout-btn:hover {
    background: #003d7a;
}

.account-signout-btn:focus-visible {
    outline: 2px solid #0268BB;
}

/* ---- Saved Documents Tab ---- */

.account-saved-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid #E5E5E5;
    background: #F7F7F7;
}

.account-saved-count {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #666;
}

.account-sort-dropdown {
    font-size: 0.875rem;
    color: #333;
    border: 1px solid #767676;
    background: #fff;
    padding: 4px 8px;
    cursor: pointer;
}

.account-sort-dropdown:focus {
    border-color: #0268BB;
    outline: none;
}

/* Saved document list */
.account-saved-list {
    /* scrolls with panel body */
}

.account-saved-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #F0F0F0;
    transition: background-color 0.15s ease;
}

.account-saved-item:hover {
    background: rgba(0, 43, 88, 0.03);
}

.account-saved-link {
    flex: 1;
    min-width: 0;
    padding: 10px 0 10px 20px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.account-saved-title {
    font-size: 1rem;
    font-weight: 600;
    color: #002B58;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.account-saved-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.account-saved-date {
    font-size: 0.75rem;
    color: #767676;
}

.account-saved-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    background: none;
    border: none;
    color: #767676;
    font-size: 0.875rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.account-saved-remove:hover {
    color: #A00000;
}

/* ---- Search History Tab ---- */

.account-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid #E5E5E5;
    background: #F7F7F7;
}

.account-history-count {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #666;
}

.account-history-clear {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #A00000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    transition: background-color 0.15s ease;
}

.account-history-clear:hover {
    background: rgba(160, 0, 0, 0.06);
}

.account-history-clear i {
    font-size: 0.8125rem;
}

/* History list */
.account-history-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #F0F0F0;
    transition: background-color 0.15s ease;
}

.account-history-item:hover {
    background: rgba(0, 43, 88, 0.03);
}

.account-history-rerun {
    flex: 1;
    min-width: 0;
    padding: 10px 0 10px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: block;
    color: inherit;
}

.account-history-query {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.account-history-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 5px;
    line-height: 1.4;
}

.account-history-badge.badge-semantic {
    background: #0268BB;
    color: #fff;
}

.account-history-badge.badge-keyword {
    background: #F7F7F7;
    color: #002B58;
    border: 1px solid #E5E5E5;
}

.account-history-time {
    font-size: 0.75rem;
    color: #767676;
}

.account-history-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    background: none;
    border: none;
    color: #767676;
    font-size: 0.875rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.account-history-remove:hover {
    color: #A00000;
}

/* ---- Shared Empty State ---- */
.account-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
}

.account-empty-state i {
    font-size: 2.5rem;
    color: #767676;
    margin-bottom: 12px;
}

.account-empty-state h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 4px 0;
}

.account-empty-state p {
    font-size: 0.8125rem;
    color: #767676;
    margin: 0;
    max-width: 260px;
    line-height: 1.5;
}

/* ---- Account Panel: Collections Tab ---- */
.account-collection-list {
    display: flex;
    flex-direction: column;
}

.account-collection-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid #F0F0F0;
}

.account-collection-item:last-child {
    border-bottom: none;
}

.account-collection-expand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    min-width: 0;
    transition: background-color 0.15s ease;
}

.account-collection-expand:hover {
    background: #FAFAFA;
}

.account-collection-icon {
    font-size: 1.25rem;
    color: #0268BB;
    flex-shrink: 0;
}

.account-collection-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.account-collection-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-collection-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #767676;
}

.account-collection-count {
    color: #666;
}

.account-collection-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 12px;
}

.account-collection-rename,
.account-collection-delete {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #767676;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.account-collection-rename:hover {
    color: #0268BB;
    background: rgba(2, 104, 187, 0.08);
}

.account-collection-delete:hover {
    color: #A00000;
    background: rgba(160, 0, 0, 0.06);
}

.account-collection-rename-input {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    border: 1px solid #0268BB;
    padding: 4px 8px;
    outline: none;
    width: 100%;
    max-width: 200px;
}

.account-collection-docs {
    width: 100%;
    background: #FAFAFA;
    border-top: 1px solid #F0F0F0;
    padding: 8px 16px 8px 48px;
}

.account-collection-docs-empty {
    font-size: 0.8125rem;
    color: #767676;
    padding: 8px 0;
    font-style: italic;
}

.account-collection-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    gap: 8px;
}

.account-collection-doc-row + .account-collection-doc-row {
    border-top: 1px solid #F0F0F0;
}

.account-collection-doc-link {
    font-size: 0.8125rem;
    color: #0268BB;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-collection-doc-link:hover {
    text-decoration: underline;
}

.account-collection-doc-link i {
    flex-shrink: 0;
    color: #767676;
}

.account-collection-remove-doc {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #767676;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.account-collection-remove-doc:hover {
    color: #A00000;
}

.account-collection-create-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #F0F0F0;
    flex-wrap: wrap;
}

.account-collection-create-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    font-size: 0.8125rem;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    border: 1px solid #767676;
    outline: none;
    transition: border-color 0.15s ease;
}

.account-collection-create-input:focus {
    border-color: #0268BB;
}

.account-collection-create-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    background: #002B58;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.account-collection-create-btn:hover {
    background: #001a3a;
}

.account-collection-create-error {
    width: 100%;
    font-size: 0.75rem;
    color: #A00000;
    margin-top: 2px;
}

/* ============================================
   Collection Picker Modal
   ============================================ */

.collection-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.collection-picker-backdrop.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.collection-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 400px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 64px);
    background: #FFFFFF;
    border-top: 3px solid #FED402;
    box-shadow: 0 8px 32px rgba(0, 43, 88, 0.2);
    z-index: 3001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.collection-picker.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.collection-picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid #F0F0F0;
}

.collection-picker-header-text {
    min-width: 0;
    flex: 1;
}

.collection-picker-title {
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #002B58;
    margin: 0;
}

.collection-picker-subtitle {
    font-size: 0.875rem;
    color: #767676;
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-picker-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.collection-picker-close:hover {
    color: #002B58;
}

.collection-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    max-height: 280px;
}

.collection-picker-list {
    display: flex;
    flex-direction: column;
}

.collection-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.1s ease;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
}

.collection-picker-item:hover {
    background: #FAFAFA;
}

.collection-picker-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #002B58;
    cursor: pointer;
}

.collection-picker-item-name {
    flex: 1;
    font-size: 0.875rem;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-picker-item-count {
    font-size: 0.75rem;
    color: #767676;
    background: #F0F0F0;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.collection-picker-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    text-align: center;
    color: #767676;
}

.collection-picker-empty i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.collection-picker-empty p {
    font-size: 0.8125rem;
    margin: 0;
    line-height: 1.5;
}

.collection-picker-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #F0F0F0;
}

.collection-picker-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.collection-picker-new-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #0268BB;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.collection-picker-new-btn:hover {
    color: #002B58;
}

.collection-picker-done-btn {
    padding: 8px 16px;
    background: #002B58;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.collection-picker-done-btn:hover {
    background: #001a38;
}

.collection-picker-count {
    margin-left: 4px;
    opacity: 0.8;
}

.collection-picker-create-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-picker-create-input {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.8125rem;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    border: 1px solid #767676;
    outline: none;
    transition: border-color 0.15s ease;
}

.collection-picker-create-input:focus {
    border-color: #0268BB;
}

.collection-picker-create-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    background: #002B58;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.collection-picker-create-btn:hover {
    background: #001a3a;
}

.collection-picker-error {
    font-size: 0.75rem;
    color: #A00000;
    margin-top: 4px;
    min-height: 16px;
}

/* ---- ConfirmDialog ---- */

.confirm-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3500;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.confirm-dialog-backdrop.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.confirm-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 420px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-top: 3px solid #FED402;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 43, 88, 0.2);
    padding: 28px 28px 24px;
    z-index: 3501;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.confirm-dialog.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.confirm-dialog-icon {
    display: none;
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    background: #FDECEC;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #D32F2F;
}

.confirm-dialog-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #002B58;
    margin: 0 0 8px;
}

.confirm-dialog-message {
    font-size: 0.9375rem;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.5;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-dialog-cancel,
.confirm-dialog-confirm {
    padding: 8px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Myriad Pro', Helvetica, Arial, sans-serif;
    border-radius: 0;
    border: 1px solid #ccc;
    background: transparent;
    color: #333;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.confirm-dialog-cancel:hover {
    background: #f5f5f5;
    border-color: #999;
}

.confirm-dialog-confirm {
    border: 1px solid #0268BB;
    background: #0268BB;
    color: #fff;
}

.confirm-dialog-confirm:hover {
    background: #014f9e;
    border-color: #014f9e;
}

.confirm-dialog-confirm[data-danger="true"] {
    background: #D32F2F;
    border-color: #D32F2F;
}

.confirm-dialog-confirm[data-danger="true"]:hover {
    background: #B71C1C;
    border-color: #B71C1C;
}

/* Mobile bottom sheet for confirm dialog (≤480px) */
@media (max-width: 480px) {
    .confirm-dialog {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        transform: translateY(100%);
        border-radius: 12px 12px 0 0;
    }
    .confirm-dialog.open {
        transform: translateY(0);
    }
}

/* ---- SharedToast Notifications ---- */

.hsdl-toast-container {
    position: fixed;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Bottom-right (default: success, info) */
.hsdl-toast-container-bottom-right {
    bottom: 20px;
}

/* Top-right (errors: high visibility) */
.hsdl-toast-container-top-right {
    top: 100px; /* Below header */
    flex-direction: column-reverse; /* Stack downward from top */
}

.hsdl-toast {
    padding: 12px 20px;
    color: #fff;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    max-width: 340px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hsdl-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.hsdl-toast-success { background: #10B981; }
.hsdl-toast-error   { background: #EF4444; }
.hsdl-toast-info    { background: #3B82F6; }

.hsdl-toast i {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ---- Collection Picker: Mobile Bottom Sheet ---- */
@media (max-width: 480px) {
    .collection-picker {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-top: 3px solid #FED402;
        border-radius: 0;
    }

    .collection-picker.open {
        transform: translateY(0);
    }
}

/* ---- Account Panel: Mobile Bottom Sheet ---- */
@media (max-width: 768px) {
    .account-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 85vh;
        border-left: none;
        border-top: 3px solid #FED402;
        box-shadow: 0 -4px 16px rgba(0, 43, 88, 0.15);
        transform: translateY(100%);
    }

    .account-panel.open {
        transform: translateY(0);
    }

    .account-panel-backdrop.visible {
        background: rgba(0, 0, 0, 0.6);
    }

    .account-panel-tab span {
        display: none;
    }

    .account-panel-tab i {
        font-size: 1.125rem;
    }

    .account-panel-tab {
        padding: 14px 8px;
    }
}

/* ---- Account Panel: Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .account-panel {
        transition: none;
    }

    .account-panel-backdrop {
        transition: none;
    }

    .account-panel-tab {
        transition: none;
    }
}


.new-search-input {
    display: flex;
    gap: 0;
    align-items: stretch;
    background: white;
    border: 2px solid #E5E5E5;
    transition: all 0.3s;
    margin-top: 2rem;
}

.new-search-input:focus-within {
    border-color: #002B58;
    box-shadow: 0 2px 8px rgba(0, 43, 88, 0.1);
}

.new-search-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
    outline: none;
    padding: 1rem 1.25rem;
}

.new-search-input input::placeholder {
    color: #767676;
}

.new-search-button {
    background: transparent;
    color: #666;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.125rem;
}

.new-search-button:hover {
    background: #002B58;
    color: white;
}

/* Stats Section */
.stats-section {
    background: #F7F7F7;
    padding: 80px 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #0268BB;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

/* HIFLD Section */
.hifld-section {
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
}

.hifld-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.hifld-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 43, 88, 0.92) 0%, rgba(2, 104, 187, 0.8) 100%);
}

.hifld-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 1.5rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    align-items: center;
}

.hifld-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FED402;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 0;
    margin-bottom: 20px;
}

.hifld-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.hifld-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 0 28px 0;
    max-width: 640px;
}

.hifld-sectors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.hifld-sector {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 0;
    transition: background 0.2s;
}

.hifld-sector:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hifld-sector i {
    font-size: 0.9rem;
    color: #FED402;
}

.hifld-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hifld-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FED402;
    color: #002B58;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.hifld-btn-primary:hover {
    background: #ffe44d;
    transform: translateY(-1px);
}

.hifld-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.hifld-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.hifld-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hifld-stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 20px 24px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.hifld-stat-number {
    display: block;
    color: #FED402;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.hifld-stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* HIFLD Responsive */
@media (max-width: 1024px) {
    .hifld-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hifld-stats {
        flex-direction: row;
    }
    .hifld-stat {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .hifld-section {
        min-height: auto;
    }
    .hifld-content {
        padding: 60px 1.5rem;
    }
    .hifld-title {
        font-size: 2rem;
    }
    .hifld-stats {
        flex-direction: column;
    }
    .hifld-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .hifld-btn-primary,
    .hifld-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hifld-content {
        padding: 48px 1rem;
    }
    .hifld-title {
        font-size: 1.6rem;
    }
    .hifld-description {
        font-size: 1rem;
    }
}

/* CTA Bottom Sheet */
.cta-sheet {
    background: #F7F7F7;
    border-top: 1px solid #E5E5E5;
}

.cta-sheet-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cta-sheet-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

.cta-sheet-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #002B58;
    letter-spacing: 0.01em;
}

.cta-sheet-chevron {
    font-size: 1.125rem;
    color: #767676;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-sheet.open .cta-sheet-chevron {
    transform: rotate(180deg);
}

.cta-sheet-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-sheet.open .cta-sheet-body {
    max-height: 300px;
}

.cta-container {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1.5rem 40px;
}

.cta-description {
    font-size: 1.0625rem;
    color: #666;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    background: #002B58;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.cta-btn-primary:hover {
    background: #001a3a;
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    background: transparent;
    color: #002B58;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #002B58;
    transition: background 0.2s ease, color 0.2s ease;
}

.cta-btn-secondary:hover {
    background: #002B58;
    color: #fff;
}

@media (max-width: 768px) {
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
.footer {
    background: #002B58;
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 60px;
    opacity: 1;
    transition: opacity 0.3s;
}

.footer-logos img:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .in-focus-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 1rem;
        max-height: none;
    }

    .in-focus-item {
        aspect-ratio: 4/3;
        height: auto;
    }

    .in-focus-item:first-child {
        grid-row: 1;
        grid-column: 1 / 3;
    }

    .in-focus-item:first-child .in-focus-card-title {
        font-size: 1.25rem;
    }

    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .collections-section {
        margin: 60px auto 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .search-input-container {
        flex-wrap: wrap;
    }

    .search-input-container input {
        width: 100%;
        order: 1;
    }

    .search-icon-btn {
        order: 0;
    }

    .search-button {
        order: 2;
        padding: 1rem 1.25rem;
    }

    .search-modes {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .mode-tab {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }

    .voice-ui {
        padding: 2rem 1rem;
    }

    .voice-wave-container {
        height: 60px;
        gap: 0.25rem;
    }

    .voice-wave-bar {
        width: 3px;
    }

    .upload-area {
        padding: 3rem 1.5rem;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .in-focus-section {
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .in-focus-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .in-focus-title {
        font-size: 1.5rem;
    }

    .in-focus-cta {
        width: 100%;
        justify-content: center;
    }

    .in-focus-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
        max-height: none;
    }

    .in-focus-item {
        aspect-ratio: 4/3;
        height: auto;
    }

    .in-focus-item:first-child {
        grid-row: auto;
        grid-column: auto;
    }

    .in-focus-item:first-child .in-focus-card-title {
        font-size: 1.125rem;
    }

    .in-focus-card-title {
        font-size: 0.875rem;
    }

    .in-focus-arrow {
        font-size: 1rem;
    }

    .in-focus-cta {
        font-size: 0.75rem;
        padding: 0.75rem 1.25rem;
    }

    .collections-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .collections-section {
        margin: 60px auto 2rem;
        padding: 2rem 1rem 0;
    }

    .collections-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .collections-title {
        font-size: 1.5rem;
    }

    .collections-cta {
        width: 100%;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.75rem 1.25rem;
    }

    .collections-card-title {
        font-size: 0.875rem;
    }

    .collections-arrow {
        font-size: 1rem;
    }

    .chat-container {
        padding: 0 1rem;
        max-width: 100%;
    }

    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .viz-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ai-summary-card {
        padding: 1.5rem;
    }

    .ai-summary-content {
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .document-card {
        padding: 1.25rem;
    }

    .document-title {
        font-size: 1rem;
    }

    .followup-suggestions {
        gap: 0.5rem;
    }

    .suggestion-chip {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }

    .search-query-display {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }

    .voice-conversation {
        padding: 0 1rem;
    }

    .voice-text {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }

    .voice-sources {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .voice-actions {
        flex-direction: column;
    }

    .voice-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 0;
    transition: all 0.3s;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: #002B58;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-nav a {
    display: block;
    color: white;
    padding: 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a:hover {
    background: rgba(254, 212, 2, 0.1);
}

.mobile-beta-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: transparent;
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    border: 1px solid #767676;
    margin: 0.5rem 0;
}

.mobile-beta-badge i {
    font-size: 0.75rem;
    color: white;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav.hidden {
        display: none;
    }

    .mobile-nav.active {
        display: block;
    }
}

/* ================================
   KEYWORDS SEARCH RESULTS
   ================================ */

/* Keywords Results Section */
.keywords-section {
    background: #ffffff;
    padding: 0;
    display: none;
    width: 100%;
    z-index: 10;
}

.keywords-section.active {
    display: block;
}

.keywords-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: none;
    z-index: 10;
    box-sizing: border-box;
}

.keywords-container.active {
    display: block;
}

/* Results Header */
.keywords-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 1.5rem;
    margin: 0 auto 1rem;
    padding: 0.625rem 0;
    width: 100%;
    max-width: 1200px;
    border-bottom: 1px solid #E5E5E5;
    box-sizing: border-box;
    align-items: center;
}

.results-meta {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.keywords-active-filters {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0.5rem 0 0;
    background: white;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    min-height: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.keywords-active-filters.visible {
    opacity: 1;
    pointer-events: auto;
}

.header-controls {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
}

/* Active Filters Header & Label */
.active-filters-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.active-filters-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Chips Container */
.active-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Individual Chip */
.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 12px;
    background: #E3F2FD;
    border: 1px solid #90CAF9;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #002B58;
}

.active-filter-chip:hover {
    background: #BBDEFB;
    border-color: #64B5F6;
}

.chip-label {
    display: inline-block;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chip-label:hover {
    color: #0268BB;
}

.chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
    margin-left: 0.25rem;
}

.chip-remove:hover {
    opacity: 1;
    color: #E53935;
}

.chip-remove:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Clear All Button */
.clear-all-filters-btn {
    align-self: center;
    background: none;
    border: none;
    color: #0268BB;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.clear-all-filters-btn:hover {
    color: #0268BB;
    opacity: 0.8;
}

.clear-all-filters-btn:focus-visible {
    outline: 2px solid #0268BB;
    outline-offset: 2px;
}

.results-subtext {
    font-size: 0.8125rem;
    color: #767676;
    margin: 0;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.results-subtext strong {
    color: #002B58;
    font-weight: 700;
    font-size: 0.9375rem;
}

.results-count {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #767676;
    margin: 0;
    white-space: nowrap;
}

/* Separator dot between results-subtext and results-count */
.results-meta .results-count::before {
    content: "\00b7";
    margin-right: 0.75rem;
    color: #bbb;
    font-weight: 700;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-controls label {
    font-size: 0.8125rem;
    color: #666;
    font-weight: 500;
}

.sort-dropdown {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    font-size: 0.8125rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-dropdown:hover {
    border-color: #0268BB;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #0268BB;
    box-shadow: 0 0 0 3px rgba(2, 104, 187, 0.1);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Filter Toggle Button */
.filter-toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #767676;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    border-color: #0268BB;
    color: #0268BB;
}

.filter-toggle-btn:focus {
    outline: none;
    border-color: #0268BB;
    box-shadow: 0 0 0 3px rgba(2, 104, 187, 0.1);
}

/* ========================================
   FILTER PANEL SYSTEM
   ======================================== */

/* Filter Control Bar */
.filter-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.filter-control-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.filter-control-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Filter Toggle Button */
.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #002B58;
    border: 1px solid #002B58;
    padding: 10px 16px;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.filter-toggle-btn:hover {
    background: #003d7a;
    border-color: #003d7a;
}

.filter-toggle-btn:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

.filter-toggle-btn.active {
    background: #0268BB;
    border-color: #0268BB;
    box-shadow: 0 0 0 2px rgba(2, 104, 187, 0.25);
}

.filter-toggle-btn i {
    font-size: 1.125rem;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-toggle-btn.active i {
    transform: rotate(180deg);
}

/* Filter Badge */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: white;
    color: #002B58;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.filter-toggle-btn.active .filter-badge {
    background: white;
    color: #002B58;
}

/* Active Filters Pills Container */
.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Filter Pill */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(2, 104, 187, 0.1);
    border: 1px solid rgba(2, 104, 187, 0.2);
    padding: 6px 10px;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0268BB;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    background: rgba(2, 104, 187, 0.15);
    border-color: rgba(2, 104, 187, 0.3);
}

.filter-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #0268BB;
    transition: color 0.15s ease;
}

.filter-pill-remove:hover {
    color: #002B58;
}

.filter-pill-remove i {
    font-size: 0.875rem;
    line-height: 1;
}

/* Clear Filters Button */
.clear-filters-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-filters-btn:hover {
    color: #002B58;
}

/* Filter Panel */
/* Page Layout - Filter Sidebar + Main Content */
.page-layout {
    position: relative;
}

.filter-panel {
    position: fixed;
    top: 80px;
    left: 0;
    width: 300px;
    height: calc(100vh - 80px);
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    transform: translateX(-100%);
    visibility: hidden;
    /* Close transition — snappy */
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.22s;
    will-change: transform;
}

.filter-panel.open {
    transform: translateX(0);
    visibility: visible;
    /* Open transition — slightly more deliberate */
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
}

@media (max-width: 1450px) {
    body.filter-open .main-content {
        margin-left: 316px;
    }
}

/* Filter Panel Content Stagger */
@keyframes filterContentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.filter-panel-header,
.filter-panel-body,
.filter-panel-footer {
    opacity: 0;
}

.filter-panel.open .filter-panel-header {
    animation: filterContentSlideIn 0.24s cubic-bezier(0.4, 0, 0.2, 1) 0.06s forwards;
}

.filter-panel.open .filter-panel-body {
    animation: filterContentSlideIn 0.24s cubic-bezier(0.4, 0, 0.2, 1) 0.12s forwards;
}

.filter-panel.open .filter-panel-footer {
    animation: filterContentSlideIn 0.24s cubic-bezier(0.4, 0, 0.2, 1) 0.18s forwards;
}

/* Filter Panel Handle (mobile only) */
.filter-panel-handle {
    display: none;
}

/* Filter Panel Header */
.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.filter-panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #002B58;
    margin: 0;
}

.filter-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
}

.filter-panel-close:hover {
    background: #e2e8f0;
    color: #002B58;
}

.filter-panel-close i {
    font-size: 1.25rem;
}

/* Filter Panel Body */
.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

/* Filter Skeleton Loading */
.filter-skeleton-group {
    border-bottom: 1px solid #e2e8f0;
}

.filter-skeleton-group:last-child {
    border-bottom: none;
}

.filter-more-hint {
    padding: 8px 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    font-style: italic;
}

.filter-panel-loading {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
}

.filter-panel-error {
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.filter-panel-error button {
    margin-top: 8px;
    background: none;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
    color: #0268BB;
    cursor: pointer;
    font-size: 0.875rem;
}

.filter-panel-error button:hover {
    background: #f8fafc;
}

/* Filter Search Input */
.filter-search {
    padding: 0;
    margin-bottom: 4px;
}

.filter-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #334155;
    outline: none;
    transition: border-color 0.15s ease;
}

.filter-search-input:focus {
    border-color: #0268BB;
}

.filter-search-input::placeholder {
    color: #94a3b8;
}

/* Filter Group */
/* Facets loading state — dims content and shows spinner */
.filter-panel-body.facets-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}
.filter-panel-body.facets-loading::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: facetSpin 0.6s linear infinite;
}
@keyframes facetSpin {
    to { transform: rotate(360deg); }
}

.filter-group {
    border-bottom: 1px solid #e2e8f0;
}

.filter-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.filter-group-header:hover {
    background: #f8fafc;
}

.filter-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #002B58;
}

.filter-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #0268BB;
    color: #FFFFFF;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    margin-left: 6px;
}

.filter-group-icon {
    font-size: 1.125rem;
    color: #64748b;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
}

.filter-group-header[aria-expanded="true"] .filter-group-icon {
    transform: rotate(180deg);
}

.filter-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-group-content.expanded {
    max-height: 400px;
    overflow-y: auto;
}

/* Filter Options */
.filter-options {
    padding: 4px 0;
}

/* Checkbox Filter */
.filter-checkbox {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.filter-checkbox:last-child {
    border-bottom: none;
}

.filter-checkbox:hover {
    background: #f8fafc;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 0;
    cursor: pointer;
    appearance: none;
    background: white;
    transition: all 0.2s ease;
    margin: 0;
}

.filter-checkbox input[type="checkbox"]:hover {
    border-color: #94a3b8;
}

.filter-checkbox input[type="checkbox"]:focus-visible {
    background-color: #E8F4FF;
    padding-left: 15px;
}

.filter-checkbox input[type="checkbox"]:checked {
    background: #0268BB;
    border-color: #0268BB;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M4.5 9L1.5 6l1-1 2 2 4.5-4.5 1 1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.filter-checkbox span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
}

.filter-checkbox-count {
    font-size: 0.875rem;
    font-weight: 300 !important;
    color: #94a3b8 !important;
    background: none;
    padding: 0;
    min-width: auto;
    text-align: right;
}

/* Radio Filter */
.filter-radio-group {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.filter-radio {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.filter-radio:last-child {
    border-bottom: none;
}

.filter-radio:hover {
    background: #f8fafc;
}

.filter-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    appearance: none;
    background: white;
    transition: all 0.2s ease;
    margin: 0;
}

.filter-radio input[type="radio"]:hover {
    border-color: #94a3b8;
}

.filter-radio input[type="radio"]:checked {
    border-color: #0268BB;
    background: white;
    box-shadow: inset 0 0 0 4px white, inset 0 0 0 8px #0268BB;
}

.filter-radio span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
}

/* Filter Panel Footer */
.filter-panel-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.filter-panel-clear {
    flex: 1;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-panel-clear:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #002B58;
}

.filter-panel-apply {
    flex: 2;
    background: #0268BB;
    border: 1px solid #0268BB;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.filter-panel-apply:hover {
    background: #0152a3;
    border-color: #0152a3;
}

.filter-panel-apply:disabled {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

.filter-panel-apply:disabled:hover {
    background: #e2e8f0;
    border-color: #e2e8f0;
}

.filter-apply-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Filter Panel Backdrop */
.filter-panel-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 99;
    pointer-events: none;
}

.filter-panel-backdrop.visible {
    pointer-events: auto;
}

/* Filter Panel Mobile Responsive */
@media (max-width: 768px) {
    .page-layout {
        display: block;
    }

    .filter-panel {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 80vh;
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
        border: none;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
        z-index: 999;
        transform: translateY(100%);
        visibility: hidden;
        /* Close — fast gravity drop */
        transition: transform 0.2s cubic-bezier(0.4, 0, 1, 1),
                    visibility 0s linear 0.2s;
        display: flex;
        will-change: transform;
    }

    .filter-panel.open {
        transform: translateY(0);
        visibility: visible;
        /* Open — spring-like settling */
        transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1),
                    visibility 0s linear 0s;
    }

    /* Mobile backdrop — heavier scrim with fade */
    .filter-panel-backdrop {
        transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .filter-panel-backdrop.visible {
        background: rgba(0, 0, 0, 0.5);
    }

    /* Mobile drag handle */
    .filter-panel-handle {
        display: flex;
        justify-content: center;
        padding: 8px 0 0;
    }

    .filter-panel-handle::after {
        content: '';
        width: 36px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
    }

    /* Mobile stagger — slide up instead of from left */
    @keyframes filterContentSlideUp {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .filter-panel.open .filter-panel-header {
        animation-name: filterContentSlideUp;
        animation-delay: 0.08s;
    }

    .filter-panel.open .filter-panel-body {
        animation-name: filterContentSlideUp;
        animation-delay: 0.14s;
    }

    .filter-panel.open .filter-panel-footer {
        animation-name: filterContentSlideUp;
        animation-delay: 0.20s;
    }

    .filter-control-bar {
        padding: 12px 0;
        margin-bottom: 16px;
    }

    .filter-toggle-btn {
        padding: 8px 12px;
        font-size: 0.875rem;
    }

    .filter-pill {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}

/* ========================================
   KEYWORD SEARCH FILTER SIDEBAR
   ======================================== */

.keywords-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    padding: 0;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.keywords-layout.sidebar-hidden {
    grid-template-columns: 1fr;
}

/* Sidebar Container */
.keywords-filter-sidebar {
    background: #FAFAFA;
    border: 1px solid #E5E5E5;
    padding: 1.5rem;
    border-radius: 0;
    height: fit-content;
    max-height: calc(100vh - 96px - 1rem);
    overflow-y: auto;
    position: sticky;
    top: 96px;
}

.keywords-layout.sidebar-hidden .keywords-filter-sidebar {
    display: none;
}

/* Results Wrapper */
.keywords-results-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

/* Filter Section */
.filter-section {
    padding-bottom: 0.625rem;
    border-bottom: 1px solid #D9D9D9;
    margin-bottom: 0.625rem;
}

.filter-section:last-of-type:not(:has(+ .filter-clear-btn)) {
    border-bottom: none;
    margin-bottom: 0.625rem;
}

/* Section Title */
/* Filter Section Title - Accordion Button */
.filter-section-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #002B58;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    margin: 0;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease, font-weight 0.2s ease;
    gap: 0.75rem;
}

/* Chevron Icon */
.filter-toggle i {
    font-size: 1rem;
    color: #666;
    flex-shrink: 0;
    margin-left: auto;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.2, 0, 0.38, 0.9);
    display: flex;
    align-items: center;
}

/* Accordion hover state */
.filter-toggle:hover {
    color: #0268BB;
}

.filter-toggle:hover i {
    color: #0268BB;
}

/* Expanded state */
.filter-toggle[aria-expanded="true"] {
    color: #002B58;
    font-weight: 700;
}

.filter-toggle[aria-expanded="true"] i {
    color: #0268BB;
    transform: rotate(-180deg);
}

/* Collapsed state */
.filter-toggle[aria-expanded="false"] i {
    transform: rotate(0deg);
}

/* Filter Section Badge */
.filter-section-badge {
    font-weight: 400 !important;
    color: #999999;
    margin-left: 0.25rem;
}

/* Filter Options Container - Smooth Animation */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    max-height: 500px;
    opacity: 1;
    overflow-y: auto;
    overflow-x: hidden;
    transition: max-height 0.3s cubic-bezier(0.2, 0, 0.38, 0.9),
                opacity 0.3s ease,
                margin 0.3s ease,
                padding 0.3s ease;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
}

/* Collapsed accordion content */
.filter-toggle[aria-expanded="false"] + .filter-options {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    padding-top: 0;
}

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

.filter-options::-webkit-scrollbar-track {
    background: transparent;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #CCC;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Filter List */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    /* Right padding keeps the term counts clear of the 6px scrollbar on
       overflowing facet sections (Author, Publisher, Subjects, etc.). */
    padding-right: 10px;
}

/* Checkbox Styling */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #555;
    cursor: pointer;
    padding: 0.125rem 0;
    user-select: none;
    transition: color 0.2s ease;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #002B58;
    flex-shrink: 0;
}

.filter-checkbox:hover {
    color: #002B58;
}

.filter-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid #002B58;
    outline-offset: 2px;
}

/* Search Input */
.filter-search {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #CCC;
    border-radius: 4px;
    background: white;
    color: #333;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-search::placeholder {
    color: #999;
}

.filter-search:focus {
    outline: none;
    border-color: #002B58;
    box-shadow: 0 0 0 3px rgba(0, 43, 88, 0.1);
}

/* Date Filter Container */
.date-filter-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Date Inputs */
.date-filter-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.date-input {
    width: 100%;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    border: 1px solid #CCC;
    border-radius: 3px;
    background: white;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: #002B58;
    box-shadow: 0 0 0 3px rgba(0, 43, 88, 0.1);
}

/* Range Slider Container */
.date-slider-container {
    position: relative;
    height: 30px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.date-slider-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.date-slider-container::after {
    content: '';
    position: absolute;
    height: 4px;
    background: #0268BB;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    left: var(--slider-from, 0%);
    right: calc(100% - var(--slider-to, 100%));
}

/* Range Slider Styling */
.date-slider {
    position: absolute;
    width: 100%;
    height: 18px;
    top: 50%;
    left: 0;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    transform: translateY(-50%);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.date-slider-from {
    z-index: 5;
}

.date-slider-to {
    z-index: 6;
}

.date-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #002B58;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    margin-top: -9px;
    pointer-events: auto;
}

.date-slider::-webkit-slider-thumb:hover {
    background: #003d7a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.date-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: transparent;
    border: none;
}

.date-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #002B58;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    margin-top: -9px;
    pointer-events: auto;
}

.date-slider::-moz-range-thumb:hover {
    background: #003d7a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.date-slider::-moz-range-track {
    background: transparent;
    border: none;
    height: 4px;
}

.date-slider::-moz-range-progress {
    background: transparent;
    border-radius: 2px;
    height: 4px;
}

/* Clear All Button */
.filter-clear-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    background: white;
    border: 1px solid #CCC;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background: #F5F5F5;
    border-color: #999;
    color: #333;
}

.filter-clear-btn:active {
    transform: scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .keywords-layout {
        grid-template-columns: 240px 1fr;
        gap: 2rem;
    }

    .keywords-filter-sidebar {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .keywords-section {
        padding: 0;
    }

    .keywords-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .keywords-filter-sidebar {
        position: static;
        margin-bottom: 1.5rem;
        border-radius: 4px;
    }

    .filter-section {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .filter-options {
        max-height: none;
    }
}

/* Keywords Results List */
.keywords-results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    scroll-margin-top: 80px; /* Clear sticky header on pagination scroll */
}

.result-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid #E5E5E5;
    border-left: 4px solid #0268BB;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-left-color: #FED402;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.result-badges {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.result-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
}

.result-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.result-badge-link:hover,
.result-badge-link:focus-visible {
    text-decoration: none;
    filter: brightness(0.95);
}

.badge-report {
    background: #0268BB;
    color: white;
}

.badge-testimony {
    background: #002B58;
    color: white;
}

.badge-framework {
    background: #FED402;
    color: #002B58;
}

.badge-research {
    background: #FCB900;
    color: #002B58;
}

/* Resource type badges */
.resource-type-badge {
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.resource-type-badge i {
    font-size: 0.8rem;
}

.resource-type-video {
    background: #7B2D8E;
    color: white;
}

.resource-type-website {
    background: #0268BB;
    color: white;
}

.resource-type-docx {
    background: #2B579A;
    color: white;
}

.resource-type-file {
    background: #666;
    color: white;
}

.resource-type-flash {
    background: #767676;
    color: white;
}

.result-date {
    font-size: 0.875rem;
    color: #767676;
}

.result-title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.result-title a {
    color: #002B58;
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: #0268BB;
    text-decoration: underline;
}

.result-excerpt {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.result-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #767676;
}

.meta-item i {
    font-size: 1rem;
}

.result-series {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #0268BB;
    margin-bottom: 0.75rem;
}

.result-series i {
    font-size: 0.9375rem;
}

.result-actions {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #F0F0F0;
}

.action-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #0268BB;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: #002B58;
}

.action-link i {
    font-size: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #767676;
    color: #666;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: #0268BB;
    border-color: #0268BB;
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-btn i {
    vertical-align: middle;
    margin-top: -2px;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.page-num {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #767676;
    color: #666;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.page-num:hover {
    background: #F7F7F7;
    border-color: #0268BB;
}

.page-num.active {
    background: #0268BB;
    border-color: #0268BB;
    color: white;
}

.page-ellipsis {
    padding: 0.5rem;
    color: #767676;
}

/* Related Searches */
.related-searches {
    padding: 2rem;
    background: #F7F7F7;
    border-radius: 4px;
}

.related-searches-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #002B58;
    margin: 0 0 1rem;
}

.related-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.related-search-item {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #767676;
    color: #0268BB;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s ease;
    font-weight: 500;
}

.related-search-item:hover {
    background: #0268BB;
    border-color: #0268BB;
    color: white;
}

/* Responsive - Keywords Search */
@media (max-width: 768px) {
    .keywords-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .header-controls {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .sort-controls {
        width: 100%;
    }

    .sort-dropdown {
        flex: 1;
    }

    .filter-bar {
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .result-item {
        padding: 1rem;
    }

    .result-title {
        font-size: 1.125rem;
    }

    .result-meta {
        gap: 1rem;
    }

    .result-actions {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   API Integration Styles
   ============================================ */

/* Loading state */
.loading-results {
    padding: 60px 20px;
    text-align: center;
    font-size: 1.125rem;
    color: #666;
    background: white;
    border-radius: 8px;
    margin: 20px 0;
}

.loading-results::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #A08968;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* No results state */
.no-results {
    padding: 60px 20px;
    text-align: center;
    font-size: 1.125rem;
    color: #666;
    background: white;
    border-radius: 8px;
    margin: 20px 0;
}

/* Error state */
.error-results {
    padding: 40px 20px;
    text-align: center;
    background: #fff4f4;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    margin: 20px 0;
}

.error-results p {
    margin: 10px 0;
    color: #cc0000;
}

/* Legacy error message style - error page uses inline styles */

/* ============================================
   Error Modal System
   ============================================ */

.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.error-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.error-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    z-index: 9999;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    border-radius: 0;
}

.error-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.error-modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: flex-end;
}

.error-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.error-modal-close:hover {
    color: #002B58;
}

.error-modal-body {
    padding: 0 2rem 2rem;
    text-align: center;
}

.error-modal-code {
    font-family: 'Minion Pro', Georgia, serif;
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    color: #002B58;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.error-modal-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #002B58;
    margin-bottom: 0.75rem;
}

.error-modal-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

.error-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-modal-btn-primary {
    background: #002B58;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
}

.error-modal-btn-primary:hover {
    background: #001a3a;
}

.error-modal-btn-primary:disabled {
    background: #767676;
    cursor: not-allowed;
}

.error-modal-btn-secondary {
    background: white;
    color: #002B58;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid #002B58;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border-radius: 0;
}

.error-modal-btn-secondary:hover {
    background: #002B58;
    color: white;
}

.error-modal-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid #E5E5E5;
    margin-top: 1rem;
}

.error-modal-details {
    font-size: 0.875rem;
    color: #888;
    font-family: monospace;
    margin-bottom: 0.75rem;
}

.error-modal-help {
    font-size: 0.875rem;
    color: #666;
}

.error-modal-help a {
    color: #0066CC;
    text-decoration: none;
}

.error-modal-help a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 520px) {
    .error-modal {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    .error-modal-code {
        font-size: 3.5rem;
    }

    .error-modal-title {
        font-size: 1.25rem;
    }

    .error-modal-actions {
        flex-direction: column;
    }

    .error-modal-btn-primary,
    .error-modal-btn-secondary {
        width: 100%;
    }
}

/* ============================================
   Enterprise Skeleton Screen System
   Per SKELETON-SCREENS-PLAN.md
   ============================================ */

/* Design Tokens */
:root {
    /* Colors - Neutral, theme-agnostic */
    --skeleton-bg-base: #f0f0f0;
    --skeleton-bg-highlight: #e0e0e0;
    --skeleton-shimmer-color: rgba(255, 255, 255, 0.4);

    /* Spacing - Match existing design system */
    --skeleton-border-radius: 4px;
    --skeleton-gap: 12px;

    /* Animation */
    --skeleton-animation-duration: 1.5s;
    --skeleton-animation-timing: ease-in-out;
}

/* Core Animations */
@keyframes skeleton-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

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

/* Base Skeleton Class */
.skeleton {
    background: var(--skeleton-bg-base);
    background-image: linear-gradient(
        90deg,
        var(--skeleton-bg-base) 25%,
        var(--skeleton-shimmer-color) 50%,
        var(--skeleton-bg-base) 75%
    );
    background-size: 300% 100%;
    animation: skeleton-shimmer var(--skeleton-animation-duration)
               var(--skeleton-animation-timing) infinite;
    border-radius: var(--skeleton-border-radius);
    position: relative;
    overflow: hidden;
    will-change: background-position;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: skeleton-pulse 2s ease-in-out infinite;
    }

    /* Filter panel — instant show/hide, no animations */
    .filter-panel,
    .filter-panel.open {
        transition: none !important;
    }

    .filter-panel-header,
    .filter-panel-body,
    .filter-panel-footer {
        opacity: 1 !important;
        animation: none !important;
    }

    .filter-panel-backdrop {
        transition: none !important;
    }

    .filter-toggle-btn,
    .filter-toggle-btn:active {
        transform: none !important;
        transition: none !important;
    }

    .filter-toggle-btn i {
        transition: none !important;
    }
}

/* Primitive Components */

/* Text line skeleton */
.skeleton-text {
    height: 1em;
    margin: 0.5em 0;
    display: inline-block;
}

.skeleton-text--short {
    width: 40%;
}

.skeleton-text--medium {
    width: 70%;
}

.skeleton-text--long {
    width: 100%;
}

/* Circle (for avatars, icons) */
.skeleton-circle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

/* Rectangle (for images, cards) */
.skeleton-rect {
    width: 100%;
    height: 200px;
}

/* Badge skeleton */
.skeleton-badge {
    display: inline-block;
    width: 80px;
    height: 24px;
    border-radius: 12px;
    margin-right: 8px;
}

/* Search Result Skeleton Component */
.skeleton-result {
    pointer-events: none;
    user-select: none;
    opacity: 0.8;
}

.skeleton-result .result-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.skeleton-result .result-title {
    min-height: 2em;
    margin-bottom: 12px;
}

.skeleton-result .result-title .skeleton-text {
    display: block;
    width: 85%;
}

.skeleton-result .result-excerpt {
    min-height: 4em;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    margin-bottom: 12px;
}

.skeleton-result .result-excerpt .skeleton-text:nth-child(1),
.skeleton-result .result-excerpt .skeleton-text:nth-child(2) {
    width: 100%;
}

.skeleton-result .result-excerpt .skeleton-text:nth-child(3) {
    width: 70%;
}

.skeleton-result .result-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.skeleton-result .result-meta .skeleton-text {
    width: 80px;
}

.skeleton-result .result-actions {
    display: flex;
    gap: 16px;
}

.skeleton-result .result-actions .skeleton-text {
    width: 60px;
}

/* Typing Indicator Skeleton */
.skeleton-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px;
    align-items: center;
}

.skeleton-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--skeleton-bg-highlight);
    animation: skeleton-typing 1.4s ease-in-out infinite;
}

.skeleton-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.skeleton-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-dot {
        animation: none;
        opacity: 0.5;
    }
}

/* AI Summary Skeleton */
.skeleton-summary {
    display: flex;
    flex-direction: column;
}

/* Document Card Skeleton */
.skeleton-document-card {
    pointer-events: none;
    user-select: none;
    opacity: 0.8;
}

.skeleton-doc-meta {
    display: flex;
    gap: 1rem;
}

.skeleton-doc-meta .skeleton-text {
    width: 80px;
}

/* Fade Transition Support */
.skeleton-fade-enter {
    opacity: 0;
}

.skeleton-fade-enter-active {
    opacity: 1;
    transition: opacity 300ms ease-in-out;
}

.skeleton-fade-exit {
    opacity: 1;
}

.skeleton-fade-exit-active {
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   DOCUMENT VIEWER (Google Drive-style)
   ============================================ */

/* ===== Overlay ===== */
.doc-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 43, 88, 0.92);
    z-index: 100000;
    display: flex;
    visibility: hidden;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 250ms;
}

.doc-viewer-overlay.open {
    visibility: visible;
    opacity: 1;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
}

/* ===== Container ===== */
.doc-viewer-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(24px);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-viewer-overlay.open .doc-viewer-container {
    transform: translateY(0);
}

/* ===== Progress Bar ===== */
.doc-viewer-progress {
    position: absolute;
    top: 48px;
    left: 0;
    height: 2px;
    width: 0;
    background: #FED402;
    transition: width 150ms ease;
    z-index: 3;
}

.doc-viewer-progress.active {
    transition: width 300ms ease;
}

/* ===== Toolbar ===== */
.doc-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 48px;
    background: #002B58;
    border-bottom: 1px solid rgba(254, 212, 2, 0.15);
    flex-shrink: 0;
    transition: transform 200ms ease;
    z-index: 2;
}

.doc-viewer-toolbar.auto-hidden {
    transform: translateY(-100%);
}

.doc-viewer-toolbar-left,
.doc-viewer-toolbar-center,
.doc-viewer-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-viewer-toolbar-left {
    flex: 1;
    min-width: 0;
}

.doc-viewer-toolbar-center {
    flex: 0 0 auto;
}

.doc-viewer-toolbar-right {
    flex: 1;
    justify-content: flex-end;
    gap: 4px;
}

/* ===== Toolbar Divider ===== */
.doc-viewer-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
    flex-shrink: 0;
}

/* ===== Filename ===== */
.doc-viewer-filename {
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* ===== Close Button ===== */
.doc-viewer-close {
    width: auto !important;
    border-radius: 6px !important;
    padding: 0 10px;
    gap: 6px;
}

.doc-viewer-close-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== Page Input ===== */
.doc-viewer-page-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

.doc-viewer-page-input {
    width: 40px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    text-align: center;
    font-size: 0.8125rem;
    font-family: inherit;
    padding: 0;
}

.doc-viewer-page-input:focus {
    outline: none;
    border-color: #FED402;
    background: rgba(255, 255, 255, 0.15);
}

.doc-viewer-page-separator {
    color: rgba(255, 255, 255, 0.4);
}

/* ===== Zoom Display Button ===== */
.doc-viewer-zoom-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    cursor: pointer;
    min-width: 60px;
    justify-content: center;
    height: 28px;
    font-family: inherit;
    transition: background 150ms ease, border-color 150ms ease;
}

.doc-viewer-zoom-display:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.doc-viewer-zoom-display i {
    font-size: 0.75rem;
}

/* ===== Zoom Dropdown ===== */
.doc-viewer-zoom-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: 120px;
    background: #1a2a40;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px;
    z-index: 100002;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.doc-viewer-zoom-dropdown.open {
    display: block;
}

.doc-viewer-zoom-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 100ms ease;
}

.doc-viewer-zoom-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.doc-viewer-zoom-option.active {
    color: #FED402;
}

.doc-viewer-zoom-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* ===== Toolbar Buttons ===== */
.doc-viewer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background-color 150ms ease, transform 100ms ease;
    flex-shrink: 0;
}

.doc-viewer-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.doc-viewer-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.18);
}

.doc-viewer-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.doc-viewer-btn:disabled:hover {
    background: transparent;
}

.doc-viewer-btn i {
    font-size: 1.125rem;
}

/* ===== Content Area ===== */
.doc-viewer-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #3a3f44;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    position: relative;
}

/* ===== Loading State / Skeleton ===== */
.doc-viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #3a3f44;
    z-index: 10;
}

.doc-viewer-loading.hidden {
    display: none;
}

.doc-viewer-skeleton {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 8.5 / 11;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 48px 40px;
}

.doc-viewer-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
    animation: doc-viewer-shimmer 1.5s infinite;
}

@keyframes doc-viewer-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.doc-viewer-skeleton-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    flex-shrink: 0;
}

.doc-viewer-loading-text {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Pages Container ===== */
.doc-viewer-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.doc-viewer-pages iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
}

/* ===== Individual Page ===== */
.doc-viewer-page {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.doc-viewer-page canvas {
    display: block;
}

/* ===== Text Layer (PDF.js) ===== */
.doc-viewer-text-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.25;
    line-height: 1;
}

.doc-viewer-text-layer span {
    color: transparent;
    position: absolute;
    white-space: pre;
    transform-origin: 0% 0%;
}

.doc-viewer-text-layer ::selection {
    background: rgba(2, 104, 187, 0.4);
}

/* ===== Page Number Label ===== */
.doc-viewer-page-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Image Viewer Mode ===== */
.doc-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Video Viewer Mode ===== */
.doc-viewer-video-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 960px;
}

.doc-viewer-video-wrapper video {
    width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    background: black;
}

/* ===== External Embed (DOCX/Website) ===== */
.doc-viewer-embed-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
    background: white;
    min-height: 80vh;
}

/* ===== Fullscreen Mode ===== */
.doc-viewer-overlay.fullscreen .doc-viewer-content {
    padding: 16px;
}

/* ===== Error States ===== */
.doc-viewer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 60px 40px;
    max-width: 420px;
    margin: 0 auto;
}

.doc-viewer-error i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.4);
}

.doc-viewer-error h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.doc-viewer-error p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.5;
}

.doc-viewer-error-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.doc-viewer-error-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms ease;
    font-family: inherit;
}

.doc-viewer-error-btn.primary {
    background: #0268BB;
    color: white;
}

.doc-viewer-error-btn.primary:hover {
    background: #015199;
}

.doc-viewer-error-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.doc-viewer-error-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Iframe Mode ===== */
.doc-viewer-container.iframe-mode .doc-viewer-toolbar-center {
    display: none;
}

.doc-viewer-container.iframe-mode .doc-viewer-toolbar-right .doc-viewer-btn:not(.doc-viewer-close),
.doc-viewer-container.iframe-mode .doc-viewer-zoom-display,
.doc-viewer-container.iframe-mode .doc-viewer-toolbar-right .doc-viewer-divider {
    display: none;
}

/* ===== Hidden utility ===== */
.doc-viewer-toolbar .hidden {
    display: none !important;
}

/* ===== Mobile Responsive — Bottom Toolbar ===== */
@media (max-width: 768px) {
    .doc-viewer-toolbar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        height: auto;
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 6px;
        border-top: 1px solid rgba(254, 212, 2, 0.15);
        border-bottom: none;
        z-index: 100002;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .doc-viewer-toolbar.auto-hidden {
        transform: translateY(100%);
    }

    .doc-viewer-progress {
        top: 0;
    }

    .doc-viewer-toolbar-left {
        order: 1;
        flex-basis: 100%;
    }

    .doc-viewer-toolbar-center {
        order: 2;
        flex: 1;
        justify-content: center;
    }

    .doc-viewer-toolbar-right {
        order: 3;
        flex: 0 0 auto;
        gap: 2px;
    }

    .doc-viewer-close-label {
        display: none;
    }

    .doc-viewer-close {
        padding: 0 !important;
        width: 34px !important;
    }

    .doc-viewer-filename {
        max-width: 180px;
        font-size: 0.8125rem;
    }

    .doc-viewer-divider {
        display: none;
    }

    .doc-viewer-btn {
        width: 36px;
        height: 36px;
    }

    .doc-viewer-content {
        padding: 8px;
        padding-bottom: 110px;
    }

    .doc-viewer-zoom-dropdown {
        right: 8px;
        bottom: 100px;
        top: auto;
    }

    .doc-viewer-zoom-display span {
        font-size: 0.75rem;
    }

    .doc-viewer-error {
        padding: 40px 20px;
    }

    .doc-viewer-error-actions {
        flex-direction: column;
        width: 100%;
    }

    .doc-viewer-error-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Print Styles ===== */
@media print {
    .doc-viewer-overlay {
        position: static;
        background: white;
        visibility: visible;
        opacity: 1;
    }

    .doc-viewer-toolbar,
    .doc-viewer-loading,
    .doc-viewer-progress,
    .doc-viewer-zoom-dropdown {
        display: none !important;
    }

    .doc-viewer-content {
        overflow: visible;
        background: white;
        padding: 0;
    }

    .doc-viewer-page {
        box-shadow: none;
        page-break-after: always;
    }
}

/* ================================
   Notification Card
   ================================ */
.notification-card {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border: 1px solid #E5E5E5;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.notification-card.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-card.hide {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.notification-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 0;
}

.notification-card-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666666;
    font-weight: 500;
}

.notification-card-label i {
    font-size: 0.9rem;
    line-height: 1;
}

.notification-card-close {
    background: none;
    border: none;
    color: #767676;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.notification-card-close:hover {
    color: #333333;
    background: #f5f5f5;
}

.notification-card-body {
    display: flex;
    gap: 16px;
    padding: 12px 16px 16px;
}

.notification-card-text {
    flex: 1;
    min-width: 0;
}

.notification-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #002B58;
    margin: 0 0 8px;
    line-height: 1.3;
}

.notification-card-desc {
    font-size: 0.9rem;
    color: #333333;
    line-height: 1.5;
    margin: 0 0 16px;
}

.notification-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #002B58;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.notification-card-cta:hover {
    background: #001a38;
    transform: translateY(-1px);
}

.notification-card-image {
    width: 130px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.notification-card-image video,
.notification-card-image img:not(.notification-card-monogram) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(90deg) scale(4);
}

.notification-card-monogram {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

@media (max-width: 480px) {
    .notification-card {
        bottom: 16px;
        right: 16px;
        width: calc(100vw - 32px);
    }
    .notification-card-image {
        display: none;
    }
}

/* ================================
   Research Assistant Page
   ================================ */
body.minimalist-mode .main-content {
    padding: 0;
}

.chat-title-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 1.5rem;
}

.chat-title-bar h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #002B58;
    margin: 0;
}

.chatkit-wrapper {
    width: 100%;
    height: calc(100vh - 80px - 3rem - 6rem);
    overflow: hidden;
}

.chatkit-wrapper openai-chatkit {
    display: block;
    width: 100%;
    height: 100%;
}

/* ================= Profile Modal ================= */

.profile-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4999;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.profile-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.profile-modal.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.profile-modal-content {
    position: relative;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 32px;
}

.profile-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.profile-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #002B58;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    margin: 0 0 4px 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #002B58;
    word-break: break-word;
}

.profile-email {
    display: block;
    font-size: 0.875rem;
    color: #666;
    word-break: break-word;
}

.profile-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #f0f0f0;
    color: #666;
}

.profile-badge[data-tier="admin"] {
    background: #FED402;
    color: #002B58;
}

.profile-badge[data-tier="restricted"] {
    background: #FF6B35;
    color: #fff;
}

.profile-badge[data-tier="public"] {
    background: #e0e0e0;
    color: #666;
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    margin: 0 0 16px 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #002B58;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-detail-item {
    display: flex;
    gap: 12px;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.detail-value {
    font-size: 0.875rem;
    color: #333;
    word-break: break-word;
}

@media (max-width: 768px) {
    .profile-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 24px;
    }

    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .profile-name, .profile-email {
        white-space: normal;
    }

    .detail-label {
        min-width: auto;
    }

    .profile-detail-item {
        flex-direction: column;
        gap: 4px;
    }
}

/* ============================================
   PHASE 2: RESPONSIVE BREAKPOINT OPTIMIZATION
   ============================================ */

/* Large Mobile (640px–768px) */
@media (min-width: 640px) and (max-width: 767px) {
    .content-container {
        max-width: 100%;
        padding: 0 1.5rem;
    }

    .keywords-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .keywords-filter-sidebar {
        display: none;
    }

    .keywords-results-wrapper {
        max-width: 100%;
    }
}

/* Tablet Landscape (768px–1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-container {
        max-width: 900px;
        padding: 0 1rem;
    }

    .keywords-layout {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }

    .keywords-results-wrapper {
        max-width: 100%;
    }

    .chat-container {
        max-width: 800px;
        margin: 1.5rem auto 3rem;
    }

    .unified-searchbox {
        max-width: 800px;
    }

    .documents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Desktop (1024px–1440px) — Already optimized */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .content-container {
        max-width: 1000px;
        padding: 0 2rem;
    }

    .keywords-layout {
        max-width: 1200px;
        margin: 0 auto;
    }

    .keywords-results-wrapper {
        max-width: 100%;
    }

    .chat-container {
        max-width: 950px;
        margin: 2rem auto 4rem;
    }

    .documents-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Consistent padding for yellow-bordered containers (site-wide) */
[style*="border"][style*="FED402"],
[style*="border-color: #FED402"],
[style*="border: 1px solid #FED"],
[style*="border: 2px solid #FED"] {
    padding: 32px !important;
}

/* Ultrawide (1920px+) */
@media (min-width: 1920px) {
    .content-container {
        max-width: 1100px;
        padding: 0 3rem;
    }

    .keywords-layout {
        max-width: 1300px;
        margin: 0 auto;
    }

    .chat-container {
        max-width: 1050px;
        margin: 2rem auto 4rem;
    }
}


/* Search Data info bar on result items */
.result-search-data {
    margin-top: 8px;
    padding: 6px 10px;
    background: #f8f9fb;
    border: 1px solid #e2e6ea;
    border-left: 3px solid #0268BB;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.6875rem;
    color: #4a5568;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Search Data toggle — hidden by default, shown via ?searchdata=1 URL param */
.search-data-toggle {
    display: none;
    align-items: center;
}

body.show-search-data .search-data-toggle {
    display: flex;
}
.search-data-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    user-select: none;
}
.search-data-toggle input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #0268BB;
}


/* Relevance threshold divider between strong and weak results */
.results-relevance-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 0 4px;
}
.results-relevance-divider .divider-line {
    flex: 1;
    height: 1px;
    background: #d1d5db;
}
.results-relevance-divider .divider-text {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
    white-space: nowrap;
}

/* Confidence notice when no strong matches found */
.results-confidence-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px 0;
    padding: 12px 16px;
    background: #fef9e7;
    border: 1px solid #f0d98c;
    border-left: 3px solid #d4a017;
    font-size: 0.8125rem;
    color: #7a6520;
    line-height: 1.5;
}
.results-confidence-notice .notice-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* "How search works" button in confidence notice */
.notice-more-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #d4a017;
    color: #7a6520;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.notice-more-btn:hover {
    background: #d4a017;
    color: white;
}

/* Search info modal overlay */
.search-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

/* Search info modal */
.search-info-modal {
    background: white;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.search-info-modal h2 {
    font-size: 1.25rem;
    color: #1a2b3c;
    margin: 0 0 12px 0;
    padding-right: 30px;
}
.search-info-modal h3 {
    font-size: 0.9375rem;
    color: #1a2b3c;
    margin: 20px 0 8px 0;
}
.search-info-modal p {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 8px 0;
}
.search-info-modal ul {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.8;
    padding-left: 20px;
    margin: 8px 0;
}
.search-info-modal em {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.8125rem;
    background: #f0f4f8;
    padding: 1px 5px;
    font-style: normal;
}
.search-info-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-info-close:hover {
    color: #333;
}

/* Two-column method cards */
.search-info-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0 16px;
}
.search-info-method {
    padding: 14px;
    background: #f8f9fb;
    border: 1px solid #e2e6ea;
}
.search-info-method h3 {
    margin: 0 0 6px 0;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0268BB;
}
.search-info-method p {
    font-size: 0.8125rem;
    margin: 0;
}

/* Ranking bands */
.search-info-bands {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
    font-size: 0.8125rem;
    color: #4a5568;
}
.band { display: flex; align-items: center; gap: 8px; }
.band-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.band-strong .band-dot { background: #16a34a; }
.band-good .band-dot { background: #0268BB; }
.band-weak .band-dot { background: #d1d5db; }

@media (max-width: 600px) {
    .search-info-methods { grid-template-columns: 1fr; }
    .search-info-modal { padding: 20px; }
}

/* Keyword highlighting in search results */
.result-title mark,
.result-excerpt mark {
    background: #fff3cd;
    color: inherit;
    padding: 1px 2px;
    border-radius: 2px;
    font-style: normal;
}
