/* Search & Citation Tool - Dark Theme Styles */

:root {
    /* Reuse existing color scheme from AI Humanizer */
    --bg-primary: #0D0C1D;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: rgba(255, 255, 255, 0.05);
    
    --glass-background: rgba(26, 26, 46, 0.6);
    --glass-background-hover: rgba(26, 26, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --primary-color: #4F46E5;
    --primary-gradient: linear-gradient(135deg, #4F46E5, #7C3AED);
    --secondary-color: #A855F7;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    
    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --text-headings: #FFFFFF;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
    
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
}

/* Aurora Background Effect */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, #4F46E5 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(120px);
    z-index: -1;
    animation: aurora-1 20s infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, #A855F7 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(120px);
    z-index: -1;
    animation: aurora-2 15s infinite alternate;
}

@keyframes aurora-1 {
    from { transform: scale(0.8) rotate(0deg); opacity: 0.1; }
    to { transform: scale(1.2) rotate(45deg); opacity: 0.2; }
}

@keyframes aurora-2 {
    from { transform: scale(1.2) rotate(0deg); opacity: 0.2; }
    to { transform: scale(0.8) rotate(-45deg); opacity: 0.1; }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 30%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* App Container */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.app-layout {
    display: flex;
    background: var(--glass-background);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 700px;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: var(--glass-background);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-headings);
}

.sidebar-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Mode Buttons */
.mode-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.mode-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: left;
    color: var(--text-secondary);
}

.mode-button:hover {
    background: var(--glass-background-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.mode-button.active {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.mode-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 2rem;
    text-align: center;
}

.mode-content {
    flex: 1;
}

.mode-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mode-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Policy Section */
.policy-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
}

.policy-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-headings);
}

.policy-control {
    margin-bottom: 1rem;
}

.policy-control label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.policy-select,
.policy-input {
    width: 100%;
    padding: 0.5rem;
    background: var(--glass-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.policy-select:focus,
.policy-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.source-type-checks {
    display: flex;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--glass-background);
    border-bottom: 1px solid var(--border-color);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-headings);
}

.mode-badge {
    padding: 0.25rem 0.75rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-icon {
    padding: 0.5rem 0.75rem;
    background: var(--glass-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon:hover {
    background: var(--glass-background-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-label {
    font-size: 0.875rem;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Input Section */
.input-section {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.input-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.input-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-tab:hover {
    color: var(--text-primary);
}

.input-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.input-panel {
    padding: 1.5rem;
}

.text-input {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.url-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.file-drop-zone:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.file-drop-zone.active {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.file-drop-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-info {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Claims Section */
.claims-section {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.claims-header h3 {
    margin: 0;
    color: var(--text-headings);
}

.claims-count {
    padding: 0.25rem 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 9999px;
    font-size: 0.875rem;
}

.claims-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.claim-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.claim-checkbox {
    margin-top: 0.25rem;
}

.claim-content {
    flex: 1;
}

.claim-text {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.claim-context {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.claim-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-verified {
    color: var(--success-color);
}

.status-disputed {
    color: var(--warning-color);
}

.status-false {
    color: var(--error-color);
}

/* Results Section */
.results-section {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.results-header {
    margin-bottom: 1.5rem;
}

.results-header h3 {
    margin: 0 0 1rem 0;
    color: var(--text-headings);
}

.integrity-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.integrity-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.integrity-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.integrity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--error-color), var(--warning-color), var(--success-color));
    border-radius: 4px;
    transition: width 1s ease;
}

.integrity-score {
    font-weight: 600;
    color: var(--text-primary);
}

/* Source Cards */
.source-cards {
    display: grid;
    gap: 1rem;
}

.source-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all var(--transition-speed);
}

.source-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.source-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-headings);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.source-title:hover {
    color: var(--primary-color);
}

.source-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.source-badges {
    display: flex;
    gap: 0.5rem;
}

.source-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-academic {
    background: rgba(168, 85, 247, 0.1);
    color: var(--secondary-color);
}

.badge-gov {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.source-snippet {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.source-actions {
    display: flex;
    gap: 0.5rem;
}

.source-action {
    padding: 0.5rem 0.75rem;
    background: var(--glass-background);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.source-action:hover {
    background: var(--glass-background-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Citation Section */
.citation-section {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
}

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

.citation-header h3 {
    margin: 0;
    color: var(--text-headings);
}

.format-select {
    padding: 0.5rem 1rem;
    background: var(--glass-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.citation-output {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.citation-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: var(--glass-background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--glass-background-hover);
    border-color: var(--border-hover);
}

/* Export Modal */
.export-format-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.export-format-btn {
    padding: 1.5rem;
    background: var(--glass-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.export-format-btn:hover {
    background: var(--glass-background-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.export-format-btn i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.export-format-btn span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Usage Info */
.usage-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.usage-tier {
    font-weight: 600;
    color: var(--primary-color);
}

.usage-counter {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mode-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .policy-section {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: start;
    }
    
    .input-tabs {
        overflow-x: auto;
    }
    
    .export-format-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .source-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0;
    }
    
    .app-layout {
        border-radius: 0;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .btn-label {
        display: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-background-hover);
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==========================================================================
   4. NAVIGATION
   ========================================================================== */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 50; /* Main nav bar z-index */
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  /* justify-content: space-between; */ /* Let flexbox handle spacing now */
  align-items: center;
  height: 4rem; /* Keep desktop height */
}

/* Base state - mobile first */
.nav-links {
  display: none; /* Hidden on mobile by default (handled by media query later) */
}

.auth-buttons {
  display: none; /* Hidden on mobile by default (handled by media query later) */
}

/* Navigation Links (General Styling) */
.nav-link { /* Applies to top-level links and dropdown toggles */
  padding: 0.5rem 0.75rem; /* Adjusted padding */
  color: var(--text-color);
  text-decoration: none;
  border-radius: 0.375rem; /* Slightly smaller radius */
  transition: background-color var(--transition-speed), color var(--transition-speed);
  white-space: nowrap;
  display: inline-flex; /* Helps align icon if added */
  align-items: center; /* Helps align icon if added */
  position: relative; /* For potential pseudo-elements if needed */
  z-index: 1; /* Ensure links are clickable above any potential background elements within parent */
}

.nav-link:hover {
  background-color: var(--glass-background-hover);
  color: var(--text-color); /* Ensure text stays white */
}

/* Active state for nav links (including dropdown toggles if needed) */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2); /* Example active style */
    /* Add other active styles if desired, like font-weight */
}


/* --- START: Desktop Dropdown Styles (Revised for Robust Hover) --- */

/* The parent container for a dropdown item */
/* In your HTML, this should wrap both the toggle and the menu */
/* e.g., <div class="nav-item nav-dropdown"> ... </div> */
.nav-item.nav-dropdown {
  position: relative; /* Crucial: Establishes positioning context for the absolute menu */
  display: inline-block; /* Or flex, depending on how you structure items */
}

/* The link/button that triggers the dropdown */
.nav-dropdown-toggle {
  cursor: pointer;
  /* Inherits .nav-link styles */
}

/* The arrow icon */
.dropdown-arrow {
  margin-left: 0.4em;
  font-size: 0.7em;
  transition: transform var(--transition-speed) ease;
  display: inline-block; /* Prevents pushing text down */
  vertical-align: middle; /* Align with text better */
}

/* The dropdown menu itself */
.nav-dropdown-menu {
  display: block; /* Or 'flex' if you need flex properties for the menu layout */
  position: absolute;
  top: 100%; /* Position below the parent .nav-item */
  left: 0;
  z-index: 1000; /* High z-index to appear above other content */
  min-width: 200px; /* Minimum width */
  padding: 0.5rem 0;
  background: #0D0C1D; /* Custom background */
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);

  /* --- Visibility Control --- */
  opacity: 0; /* Start fully transparent */
  visibility: hidden; /* Start hidden from accessibility tree and rendering */
  transform: translateY(5px); /* Start slightly lower (adjust px as desired) */
  pointer-events: none; /* Prevent interaction when hidden */
  transition: opacity var(--transition-speed) ease,
              visibility var(--transition-speed) ease, /* transition visibility *instantly* with opacity */
              transform var(--transition-speed) ease;
}

/* ---- The KEY HOVER RULE ---- */
/* Show dropdown menu when the PARENT container is hovered */
.nav-item.nav-dropdown:hover > .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* Move back to original position */
  pointer-events: auto; /* Allow interaction */
}

/* Rotate arrow when the PARENT container is hovered */
.nav-item.nav-dropdown:hover > .nav-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

/* Individual items within the dropdown menu */
.nav-dropdown-item {
  display: block;
  padding: 0.6rem 1.2rem; /* Generous padding */
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  background-color: transparent; /* Ensure no background by default */
  border: 0;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus, /* Add focus style for accessibility */
.nav-dropdown-item.active /* Style for active item within dropdown */ {
  background-color: var(--secondary-color); /* Use secondary color for hover/focus/active */
  color: var(--text-color);
  text-decoration: none; /* Ensure no underline appears on hover if not desired */
}
/* --- END: Desktop Dropdown Styles --- */


/* Mobile Menu Button */
.mobile-menu-button {
  display: block; /* Show by default, hide on desktop via media query */
  background: none;
  border: none;
  color: var(--text-color);
  padding: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition-speed);
  z-index: 51; /* Above mobile menu background */
}

.mobile-menu-button:hover {
  opacity: 0.8;
}

/* Mobile Menu Panel */
.mobile-menu {
  display: none; /* Hidden by default */
  position: fixed;
  /* Adjusted top based on nav height in media queries */
  left: 0;
  right: 0;
  background: #0D0C1D;
  backdrop-filter: blur(12px); /* Increased blur */
  padding: 1rem 0; /* Adjusted padding */
  /* Max height set in media queries */
  overflow-y: auto; /* Allow scrolling if needed */
  transform: translateY(-100%); /* Start hidden above */
  transition: transform var(--transition-speed) ease-out;
  z-index: 49; /* Below navbar container */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  transform: translateY(0);
  display: block;
}

/* Mobile menu general link styling */
.mobile-menu .nav-link:not(.sub-link), /* Target top-level links */
.mobile-menu .mobile-submenu-toggle { /* And the toggle button */
  display: block;
  padding: 0.9rem 1.5rem; /* Adjusted padding */
  text-align: left; /* Align text left */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 1rem;
  width: 100%; /* Ensure full width */
  box-sizing: border-box; /* Include padding in width */
  color: var(--text-color);
}




/* Style last top-level item before auth buttons */
.mobile-menu > *:not(.mobile-menu-section):not(.auth-buttons-mobile):last-of-type {
    border-bottom: none;
}
/* Remove bottom border from last mobile menu section */
.mobile-menu .mobile-menu-section:last-of-type > .mobile-submenu-toggle {
    border-bottom: none;
}


/* --- NEW: Mobile Submenu Styles --- */
.mobile-menu-section {
    /* Container for a toggle + submenu block */
}

.mobile-submenu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex; /* Use flex to align text and icon */
    justify-content: space-between; /* Push icon to the right */
    align-items: center;
    /* Inherits padding, font-size etc from the rule above */
}

.mobile-submenu-toggle .dropdown-arrow {
    transition: transform var(--transition-speed) ease;
    font-size: 0.9em; /* Adjust arrow size */
}

/* Toggle active state (assuming JS adds 'active' class or similar) */
/* You might need JS to add this class when expanded */
.mobile-submenu-toggle[aria-expanded="true"] .dropdown-arrow {
     transform: rotate(180deg);
}

.mobile-submenu {
    background-color: rgba(0, 0, 0, 0.1); /* Slight indent background */
    /* display: none; */ /* JS handles display: block/none */
    padding-left: 0; /* Remove padding, handled by sub-links */
    overflow: hidden; /* Helps with animations if added later */
    max-height: 0; /* Start height at 0 for transition */
    transition: max-height 0.3s ease-out; /* Animate height */
}

.mobile-submenu .sub-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem; /* Indented padding */
    text-align: left;
    font-size: 0.9rem; /* Slightly smaller */
    color: rgba(255, 255, 255, 0.9); /* Slightly dimmer text */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.mobile-submenu .sub-link:last-child {
    border-bottom: none; /* Remove border from last sub-item */
}

.mobile-submenu .sub-link:hover,
.mobile-submenu .sub-link.active /* Style active mobile sublink */ {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}
/* --- END: Mobile Submenu Styles --- */


/* Style separator before mobile auth buttons */
.mobile-menu .auth-buttons-mobile {
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Use top border for separation */
  padding-top: 1.5rem; /* Add space above buttons */
  margin-top: 1rem; /* Add space below last link/section */
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 1rem;
}

/* Logo Styling */
.nav-logo-link {
    display: inline-flex; /* Use flex to help center image if needed */
    align-items: center;
    height: 100%; /* Make link take full nav height for easier clicking */
    padding: 0.25rem 0; /* Add slight vertical padding */
    margin-right: 1rem; /* Space between logo and next item (adjusted in media queries) */
}

.nav-logo-img {
    height: 32px; /* Default height (adjust as needed, maybe match original?) */
    width: auto;   /* Maintain aspect ratio */
    max-height: calc(100% - 0.5rem); /* Ensure it fits within padding */
    transition: height var(--transition-speed) ease; /* Smooth transition */
    display: block; /* Remove extra space below image */
}

/* Small Screens (Mobile first is base, so this is mostly adjustments) */
@media (max-width: 640px) {
  .banner-link {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .hero-title {
      font-size: 2.25rem; /* Smaller hero title */
  }
   .hero-description {
      font-size: 1rem;
  }

  /* Mobile Modal Adjustments */
  .modal-dialog {
    margin: 1rem auto; /* Center vertically too */
    width: calc(100% - 2rem);
  }
  .modal-content {
    border-radius: 1rem; /* Match card radius */
  }
  .modal-body {
    padding: 1.25rem; /* Slightly less padding */
    font-size: 1rem;
  }
  .modal-footer {
    flex-direction: column-reverse; /* Stack buttons, primary often last */
    align-items: stretch; /* Make buttons full width */
    gap: 0.5rem;
  }
  .modal-footer .button {
    width: 100%; /* Full width buttons */
  }
  .modal-footer .ms-auto { /* Reset margin helper on mobile */
      margin-left: 0 !important;
  }
}

/* Tablets and smaller desktops (where mobile menu might still be preferred) */
@media (max-width: 859px) { /* Mobile nav breakpoint */
  .nav-links,
  .auth-buttons {
    display: none; /* Hide desktop elements */
  }
  .mobile-menu-button {
    display: block; /* Ensure mobile button is shown */
    margin-left: auto; /* Push mobile button to the right, making space for logo */
  }
  .nav-container { /* Slightly thinner nav on smaller screens */
      height: 4rem;
  }
   .mobile-menu { /* Adjust top position based on nav height */
        top: 3.5rem;
        max-height: calc(100vh - 3.5rem);
   }

   /* --- START: Adjust logo size for mobile nav --- */
   .nav-logo-img {
       height: 64px; /* Smaller logo on mobile */
   }
   .nav-logo-link {
       margin-right: 0.5rem; /* Reduce space on mobile */
   }
   /* --- END: Adjust logo size --- */

   /* Footer adjustments */
   .footer-grid { /* Stack footer columns earlier */
       grid-template-columns: 1fr;
       gap: 2rem;
   }
   .footer-bottom-content { /* Center footer bottom content */
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
   .footer-bottom-links {
        justify-content: center;
    }
}


/* Desktop Navigation */
@media (min-width: 860px) { /* Desktop nav breakpoint */
  .mobile-menu-button {
    display: none; /* Hide mobile button */
  }
  .mobile-menu {
    display: none !important; /* Ensure mobile menu is hidden */
  }
  .nav-links {
    display: flex; /* Show desktop links */
    gap: 0.5rem; /* Start with smaller gap */
    align-items: center; /* Align items vertically */
    margin-left: 1rem; /* Space after the logo */
    margin-right: auto; /* Push auth buttons to the right */
  }
  .nav-link {
    padding: 0.5rem 0.75rem; /* Adjust padding */
    font-size: 0.9rem;
  }
  .auth-buttons {
    display: flex; /* Show desktop auth buttons */
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem; /* Space before auth buttons */
  }
  .nav-content { /* Restore nav height */
      height: 4rem;
  }

  /* --- START: Restore logo size for desktop --- */
  .nav-logo-img {
       height: 64px; /* Restore desktop logo height */
  }
  .nav-logo-link {
       margin-right: 1rem; /* Restore desktop space */
   }
  /* --- END: Restore logo size --- */
}

/* Larger Desktops */
@media (min-width: 1024px) {
  .nav-links {
    gap: 1rem; /* Increase gap */
  }
  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.95rem; /* Slightly larger font */
  }
  .auth-buttons {
    gap: 0.75rem; /* Increase gap */
  }
  .button { /* Adjust base button padding for larger screens */
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
   .footer-grid { /* More space in footer grid */
       gap: 3rem 4rem;
   }
}

/* Extra Large Screens */
@media (min-width: 1280px) {
  .nav-content, .footer-container {
    padding-left: 2rem; /* More padding for container */
    padding-right: 2rem;
  }
  .nav-links {
    gap: 1.5rem; /* Further increase gap */
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large screens: Consider 5 columns since you have 5 cards */
@media (min-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   7. BANNER
   ========================================================================== */
.banner-container {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  position: relative;
  overflow: hidden;
}

.banner-content {
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.banner-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.875rem;
  transition: opacity 0.3s ease;
}

.banner-link:hover {
  opacity: 0.9;
  color: var(--text-color);
}
* ==========================================================================
   6. BUTTONS
   ========================================================================== */


.button {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-weight: 500;
  display: inline-flex; /* Align icon and text */
  align-items: center;
  justify-content: center;
  text-align: center; /* Ensure text is centered */
}

.button-primary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid transparent; /* Add transparent border for consistency */
}

.button-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.button-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
}

.button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu Buttons */
.auth-buttons-mobile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* More flexible columns */
  gap: 0.75rem;
}

.profile-menu {
    background-color: #eb7113 !important;
}

.profile-item.logout {
    color: white!important;
}
.profile-icon, .submit-icon {
    padding: 10px!important;
    border-radius: 10px;
}

.mobile-menu .button {
  width: 100%;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
}

.mobile-menu .button-primary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-menu .button-primary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-menu .button-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.mobile-menu .button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}


/* ==========================================================================
   3. BANNER COMPONENT
   ========================================================================== */
.banner-container {
  width: 100%;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.banner-content {
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.banner-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-glass);
  text-align: center;
  font-size: 0.875rem;
  transition: opacity 0.3s ease;
}

.banner-link:hover {
  opacity: 0.9;
  color: var(--text-primary);
}

/* ==========================================================================
   13. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 640px) {
  .banner-link {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }

  .modal-dialog {
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .modal-content {
    border-radius: 1.25rem;
  }
  
  .modal-body {
    padding: 1.5rem;
    font-size: 1.1rem;
  }
  
  .modal-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-footer .button {
    width: 100%;
    padding: 0.75rem;
  }
  
  .submit-form {
    padding: 1.5rem;
  }
  
  .submit-button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    gap: 2rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  .footer-container {
    padding: 0 1rem;
  }
}

@media (max-width: 859px) {
  .nav-links,
  .auth-buttons {
    display: none;
  }
  
  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }
  
  .nav-container {
    height: 4rem;
  }
  
  .mobile-menu {
    top: 3.5rem;
    max-height: calc(100vh - 3.5rem);
  }

  .nav-logo-img {
    height: 64px;
  }
  
  .nav-logo-link {
    margin-right: 0.5rem;
  }
}

@media (min-width: 860px) {
  .mobile-menu-button {
    display: none;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
    margin-right: auto;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
  }
  
  .nav-content {
    height: 4rem;
  }

  .nav-logo-img {
    height: 64px;
  }
  
  .nav-logo-link {
    margin-right: 1rem;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  
  .auth-buttons {
    gap: 0.75rem;
  }
  
  .button {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
}

@media (min-width: 1280px) {
  .nav-content, .footer-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
}
.button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.95rem;
}
.hero-modern {
  text-align: center;
  padding: 4rem 1rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: float 20s linear infinite;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.1;
  filter: blur(100px);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--accent-primary);
}

.hero-title-modern {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 30%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description-modern {
  max-width: 48rem;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

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

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary,
.btn-hero-secondary {
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: 1px solid transparent;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.4);
  color: white;
}

.btn-hero-secondary {
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-hero-secondary:hover {
  background: var(--surface-glass-hover);
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
}

/* =========================================================================
   Verification & Evidence Engine — v2 components
   ========================================================================= */

.claims-header-info { display: flex; flex-direction: column; gap: 0.25rem; }

.integrity-meter { min-width: 260px; }
.integrity-fill.v-supported   { background: var(--success-color); }
.integrity-fill.v-disputed    { background: var(--warning-color); }
.integrity-fill.v-unsupported { background: var(--error-color); }

.verify-disclaimer {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; color: var(--text-secondary);
    background: rgba(79, 70, 229, 0.07);
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 0.6rem; padding: 0.6rem 0.9rem; margin-bottom: 1.25rem;
}
.verify-disclaimer i { color: var(--primary-color); }

/* ---- Claim cards ---- */
.claim-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.1rem 1.25rem;
    transition: border-color var(--transition-speed) ease, background var(--transition-speed) ease;
}
.claim-card:has(.v-supported)   { border-left-color: var(--success-color); }
.claim-card:has(.v-disputed)    { border-left-color: var(--warning-color); }
.claim-card:has(.v-unsupported) { border-left-color: var(--error-color); }

.claim-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.claim-main { flex: 1; }
.claim-text { font-weight: 600; color: var(--text-primary); line-height: 1.5; }
.claim-context { margin-top: 0.35rem; font-size: 0.82rem; color: var(--text-muted); font-style: italic; }
.claim-type-badge {
    flex-shrink: 0; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--secondary-color); background: rgba(168, 85, 247, 0.12);
    padding: 0.18rem 0.55rem; border-radius: 9999px;
}

.claim-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; }

.verdict-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 9999px;
    border: 1px solid transparent;
}
.verdict-chip.v-pending      { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.verdict-chip.v-supported    { color: var(--success-color); background: rgba(16,185,129,0.12);  border-color: rgba(16,185,129,0.3); }
.verdict-chip.v-disputed     { color: var(--warning-color); background: rgba(245,158,11,0.12);  border-color: rgba(245,158,11,0.3); }
.verdict-chip.v-unsupported  { color: var(--error-color);   background: rgba(239,68,68,0.12);   border-color: rgba(239,68,68,0.3); }
.verdict-chip.v-insufficient { color: var(--text-secondary); background: rgba(148,163,184,0.12); border-color: rgba(148,163,184,0.25); }

.disagree-flag {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.76rem; font-weight: 600; color: var(--warning-color);
    background: rgba(245,158,11,0.1); padding: 0.25rem 0.6rem; border-radius: 9999px;
}

.conf-wrap { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.conf-bar { width: 90px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.conf-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.conf-fill.v-supported    { background: var(--success-color); }
.conf-fill.v-disputed     { background: var(--warning-color); }
.conf-fill.v-unsupported  { background: var(--error-color); }
.conf-fill.v-insufficient { background: var(--text-muted); }
.conf-num { font-size: 0.78rem; color: var(--text-secondary); min-width: 34px; text-align: right; }

/* ---- Evidence ledger ---- */
.claim-evidence { margin-top: 0.9rem; }
.claim-rationale {
    font-size: 0.87rem; color: var(--text-secondary); line-height: 1.5;
    padding: 0.6rem 0.8rem; background: rgba(255,255,255,0.02);
    border-radius: 0.5rem; margin-bottom: 0.75rem;
}
.evidence-list { display: flex; flex-direction: column; gap: 0.6rem; }
.no-evidence { font-size: 0.85rem; color: var(--text-muted); padding: 0.5rem 0; }

.evidence-item {
    display: flex; gap: 0.75rem; align-items: flex-start;
    padding: 0.75rem 0.85rem; border-radius: 0.6rem;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border-color);
}
.stance-icon {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
}
.stance-icon.st-supports { color: var(--success-color); background: rgba(16,185,129,0.15); }
.stance-icon.st-refutes  { color: var(--error-color);   background: rgba(239,68,68,0.15); }
.stance-icon.st-unclear  { color: var(--text-secondary); background: rgba(148,163,184,0.12); }

.evidence-body { flex: 1; min-width: 0; }
.evidence-title { color: var(--text-primary); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.evidence-title:hover { color: var(--primary-color); text-decoration: underline; }
.evidence-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

.src-badge {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 0.1rem 0.4rem; border-radius: 4px; background: rgba(255,255,255,0.08); color: var(--text-secondary);
}
.src-badge.b-academic { background: rgba(168,85,247,0.16); color: var(--secondary-color); }
.src-badge.b-gov      { background: rgba(6,182,212,0.16);  color: #22d3ee; }
.src-badge.b-edu      { background: rgba(79,70,229,0.16);  color: var(--primary-color); }

.evidence-quote {
    margin: 0.5rem 0 0; padding: 0.4rem 0.75rem; font-size: 0.84rem; line-height: 1.5;
    color: var(--text-secondary); border-left: 2px solid var(--border-hover);
    background: rgba(255,255,255,0.02); border-radius: 0 0.4rem 0.4rem 0;
}

.evidence-add {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 0.5rem;
    border: 1px solid var(--border-color); background: rgba(255,255,255,0.03);
    color: var(--text-secondary); cursor: pointer; transition: all var(--transition-speed) ease;
}
.evidence-add:hover { border-color: var(--primary-color); color: var(--primary-color); }
.evidence-add.added { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ---- Citations ---- */
.cite-empty { color: var(--text-muted); font-size: 0.88rem; }
.cite-line { display: flex; gap: 0.6rem; margin-bottom: 0.9rem; }
.cite-num { color: var(--primary-color); font-weight: 600; flex-shrink: 0; }
.cite-line pre {
    margin: 0; white-space: pre-wrap; word-break: break-word; font-family: 'SFMono-Regular', Menlo, monospace;
    font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6;
}

/* ---- History ---- */
.verdict-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem; background: var(--text-muted); }
.verdict-dot.v-supported { background: var(--success-color); }
.verdict-dot.v-disputed { background: var(--warning-color); }
.verdict-dot.v-unsupported { background: var(--error-color); }
.hist-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); }
.hist-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.hist-claim { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; margin-bottom: 0.25rem; }

/* ---- Modal ---- */
.sc-modal {
    position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); padding: 1rem;
}
.sc-modal-card {
    width: 100%; max-width: 560px; max-height: 80vh; overflow: auto;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: 1rem; box-shadow: var(--shadow-xl);
}
.sc-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.sc-modal-head h5 { margin: 0; color: var(--text-headings); }
.sc-modal-x { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.sc-modal-body { padding: 1.25rem; }
.sc-modal-foot { padding: 0.9rem 1.25rem; border-top: 1px solid var(--border-color); text-align: right; }

/* ---- Toasts ---- */
#sc-toasts { position: fixed; top: 20px; right: 20px; z-index: 10002; display: flex; flex-direction: column; gap: 0.6rem; }
.sc-toast {
    padding: 0.8rem 1.2rem; border-radius: 0.6rem; color: #fff; font-size: 0.87rem; cursor: pointer;
    box-shadow: var(--shadow-lg); animation: sc-slide-in 0.3s ease; max-width: 340px;
    background: var(--primary-color);
}
.sc-toast-error   { background: var(--error-color); }
.sc-toast-success { background: var(--success-color); }
.sc-toast-warning { background: var(--warning-color); }
.sc-toast.out { animation: sc-slide-out 0.3s ease forwards; }
@keyframes sc-slide-in  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes sc-slide-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(110%); opacity: 0; } }

@media (max-width: 640px) {
    .claim-card-head { flex-direction: column; }
    .conf-wrap { margin-left: 0; }
    .integrity-meter { min-width: 0; width: 100%; }
}

/* ---- Sharing ---- */
.claim-share {
    background: none; border: 1px solid var(--border-color); color: var(--text-secondary);
    width: 30px; height: 30px; border-radius: 0.5rem; cursor: pointer; flex-shrink: 0;
    transition: all var(--transition-speed) ease;
}
.claim-share:hover { border-color: var(--primary-color); color: var(--primary-color); }

.share-lead { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; white-space: pre-line; margin-bottom: 1rem; }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1.1rem; }
.share-net {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.9rem;
    border: 1px solid var(--border-color); border-radius: 0.6rem; color: var(--text-primary);
    text-decoration: none; font-size: 0.88rem; transition: all var(--transition-speed) ease;
}
.share-net:hover { border-color: var(--primary-color); background: rgba(79,70,229,0.08); color: var(--text-primary); }
.share-net i { width: 18px; text-align: center; color: var(--primary-color); }
.share-copy { display: flex; gap: 0.5rem; }
.share-copy input {
    flex: 1; padding: 0.6rem 0.8rem; border-radius: 0.5rem; border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03); color: var(--text-secondary); font-size: 0.82rem;
}

/* =========================================================================
   Insight panels — source mix, annotated text, permalinks (v3)
   ========================================================================= */
.insight-section {
    background: var(--glass-background); backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); border-radius: 1rem;
    padding: 1.5rem; margin-bottom: 2rem;
}
.insight-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.insight-head h3 { margin: 0; color: var(--text-headings); }
.insight-sub { font-size: 0.8rem; color: var(--text-muted); }
.insight-note { margin: 1rem 0 0; font-size: 0.76rem; color: var(--text-muted); line-height: 1.5; display: flex; gap: 0.45rem; }
.insight-note i { color: var(--primary-color); margin-top: 0.15rem; }

/* Source mix */
.mix-stat-row { display: flex; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.mix-stat {
    flex: 1; min-width: 90px; text-align: center; padding: 0.8rem;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-radius: 0.75rem;
}
.mix-num { font-size: 1.6rem; font-weight: 700; color: var(--text-headings); line-height: 1; }
.mix-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-top: 0.35rem; }
.mix-group { margin-bottom: 1rem; }
.mix-group h4 { margin: 0 0 0.5rem; font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }
.mix-cav { font-size: 0.66rem; color: var(--warning-color); background: rgba(245,158,11,0.12); padding: 0.05rem 0.4rem; border-radius: 9999px; margin-left: 0.4rem; text-transform: uppercase; letter-spacing: 0.03em; }
.mix-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mix-chip {
    display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem;
    padding: 0.3rem 0.4rem 0.3rem 0.7rem; border-radius: 9999px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-color); color: var(--text-secondary);
}
.mix-chip .mix-v {
    background: var(--primary-color); color: #fff; font-weight: 600; font-size: 0.72rem;
    min-width: 20px; text-align: center; padding: 0.05rem 0.4rem; border-radius: 9999px;
}

/* Annotated text */
.annotated-text {
    line-height: 1.9; font-size: 0.95rem; color: var(--text-secondary); white-space: pre-wrap;
    max-height: 420px; overflow-y: auto; padding: 1rem; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color); border-radius: 0.75rem;
}
.anno { color: inherit; padding: 0.05rem 0.15rem; border-radius: 3px; cursor: pointer; border-bottom: 2px solid; background: transparent; }
.anno.v-supported   { background: rgba(16,185,129,0.16);  border-bottom-color: var(--success-color); }
.anno.v-disputed    { background: rgba(245,158,11,0.16);  border-bottom-color: var(--warning-color); }
.anno.v-unsupported { background: rgba(239,68,68,0.16);   border-bottom-color: var(--error-color); }
.anno.v-insufficient{ background: rgba(148,163,184,0.16); border-bottom-color: var(--text-muted); }

.claim-card.flash { animation: sc-card-flash 1.2s ease; }
@keyframes sc-card-flash { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px var(--primary-color); } }

/* Read-only shared report */
.readonly-banner {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    font-size: 0.85rem; color: var(--text-secondary);
    background: rgba(79,70,229,0.1); border: 1px solid rgba(79,70,229,0.25);
    border-radius: 0.6rem; padding: 0.7rem 1rem; margin-bottom: 1.25rem;
}
.readonly-banner i { color: var(--primary-color); }
.readonly-banner a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.readonly-banner a:hover { text-decoration: underline; }

/* Citation hint + permalink */
.cite-hint { margin: 0.9rem 0 0; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.cite-hint i { color: var(--primary-color); margin-right: 0.3rem; }
.share-permalink { width: 100%; justify-content: center; margin-bottom: 1.1rem; }
.share-permalink-note { font-size: 0.82rem; color: var(--success-color); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; }
