/* =============================================
   GLOBAL NAV — Top bar + Side Drawer
   ============================================= */

/* Top Nav Bar */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 var(--section-margin);
  height: 72px;
  transition: transform 0.4s var(--ease), background 0.3s, backdrop-filter 0.3s;
}
.top-nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.top-nav.hidden { transform: translateY(-100%); }

/* Nav left cluster */
.nav-left { display: flex; align-items: center; gap: 48px; flex-shrink: 0; }

/* Logo */
.nav-logo { display: flex; align-items: center; }
.nav-logo img { width: 48px; height: 48px; transition: filter 0.3s; }

/* Logo color logic:
   - Dark theme, not scrolled (over dark hero): white logo
   - Dark theme, scrolled: light logo (invert)
   - Light theme, not scrolled on HOMEPAGE (dark hero): default (dark)
   - Light theme, scrolled / inner pages: dark logo (invert to dark)
*/
.nav-logo img { filter: invert(1); }
.top-nav:not(.scrolled) .nav-logo img { filter: invert(1) brightness(2); }
[data-theme="light"] .nav-logo img { filter: invert(1); }
[data-theme="light"] .top-nav:not(.scrolled) .nav-logo img { filter: none; }

/* Inner pages: dark logo on light theme, original (light) logo on dark theme */
.top-nav--inner .nav-logo img { filter: invert(1) !important; }
[data-theme="light"] .top-nav--inner .nav-logo img { filter: invert(1) !important; }
[data-theme="light"] .top-nav--inner:not(.scrolled) .nav-logo img { filter: invert(1) !important; }

/* Energy Index badge */
.nav-index {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
  color: var(--text-dim); margin-left: 35px;
  cursor: pointer; padding: 8px 12px;
  border-radius: 8px; transition: all 0.2s;
}
.nav-index:hover { background: var(--cell-bg); color: var(--text); }
.top-nav:not(.scrolled) .nav-index { color: rgba(255,255,255,0.7); }
.top-nav:not(.scrolled) .nav-index:hover { background: rgba(255,255,255,0.1); color: #fff; }
.top-nav--inner .nav-index { color: var(--text-dim); }
.top-nav--inner:not(.scrolled) .nav-index { color: var(--text-dim); }

.nav-index-arrow { width: 12px; height: 12px; opacity: 0.5; transition: opacity 0.2s, transform 0.2s; }
.nav-index:hover .nav-index-arrow { opacity: 1; transform: translateX(2px); }
.nav-index-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #a3e635; box-shadow: 0 0 8px rgba(163, 230, 53, 0.6);
  animation: navPulse 2s infinite;
}
@keyframes navPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Nav links cluster — pushed right */
.nav-links {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
}

/* Nav items */
.nav-item {
  position: relative; font-size: 14px;
  color: var(--text-dim); padding: 8px 14px;
  border-radius: 8px; transition: all 0.2s;
}
.nav-item sup { font-size: 9px; font-weight: 500; opacity: 0.5; margin-left: 2px; vertical-align: super; }
.nav-item:hover { color: var(--text); }
.nav-item.is-drawer-active { color: var(--text); }
.top-nav:not(.scrolled) .nav-item { color: #fff; }
.top-nav:not(.scrolled) .nav-item:hover { color: #fff; }
.top-nav:not(.scrolled) .nav-item.is-drawer-active { color: #fff; }

/* Inner pages: nav items always dark */
.top-nav--inner .nav-item { color: var(--text-dim); }
.top-nav--inner:not(.scrolled) .nav-item { color: var(--text-dim); }
.top-nav--inner .nav-item:hover,
.top-nav--inner .nav-item.is-drawer-active { color: var(--text); }

/* Active indicator dot */
.nav-item.is-drawer-active::after {
  content: ''; position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%); width: 3px; height: 3px;
  border-radius: 50%; background: currentColor; opacity: 0.5;
}

/* Text links */
.nav-text-link { font-size: 14px; color: var(--text-dim); padding: 8px 14px; transition: color 0.2s; }
.nav-text-link:hover { color: var(--text); }
.top-nav:not(.scrolled) .nav-text-link { color: #fff; }
.top-nav:not(.scrolled) .nav-text-link:hover { color: #fff; }
.top-nav--inner .nav-text-link { color: var(--text-dim); }
.top-nav--inner:not(.scrolled) .nav-text-link { color: var(--text-dim); }

/* Divider */
.nav-divider { width: 1px; height: 20px; background: rgba(128,128,128,0.15); margin: 0 8px; }
.top-nav:not(.scrolled) .nav-divider { background: rgba(255,255,255,0.15); }
.top-nav--inner .nav-divider { background: rgba(128,128,128,0.15); }

/* Icon cluster */
.nav-icons { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; color: var(--text-dim);
}
.nav-icon-btn:hover { color: var(--text); }
.nav-icon-btn svg { width: 18px; height: 18px; }
.top-nav:not(.scrolled) .nav-icon-btn { color: #fff; }
.top-nav:not(.scrolled) .nav-icon-btn:hover { color: #fff; }
.top-nav--inner .nav-icon-btn { color: var(--text-dim); }
.top-nav--inner:not(.scrolled) .nav-icon-btn { color: var(--text-dim); }

/* Hamburger */
.nav-hamburger {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; position: relative;
}
.nav-hamburger:hover { opacity: 0.7; }
.nav-hamburger .ham-dark,
.nav-hamburger .ham-white {
  width: 20px; height: 20px; position: absolute; transition: opacity 0.3s;
}
.nav-hamburger .ham-dark { opacity: 1; }
.nav-hamburger .ham-white { opacity: 0; }
.top-nav:not(.scrolled) .nav-hamburger .ham-dark { opacity: 0; }
.top-nav:not(.scrolled) .nav-hamburger .ham-white { opacity: 1; }
[data-theme="light"] .top-nav.scrolled .nav-hamburger .ham-white { opacity: 0; }
[data-theme="light"] .top-nav:not(.scrolled) .nav-hamburger .ham-white { opacity: 1; }

/* Inner pages: dark hamburger on light theme, white hamburger on dark theme */
.top-nav--inner .nav-hamburger .ham-dark { opacity: 1 !important; }
.top-nav--inner .nav-hamburger .ham-white { opacity: 0 !important; }

/* X close icon */
.nav-hamburger .ham-x {
  position: absolute; width: 18px; height: 18px;
  opacity: 0; transition: opacity 0.3s;
}
.nav-hamburger .ham-x line { stroke: var(--text, #1F1F23); stroke-width: 1.2; }
body.drawer-open .nav-hamburger .ham-dark,
body.drawer-open .nav-hamburger .ham-white { opacity: 0 !important; }
body.drawer-open .nav-hamburger .ham-x { opacity: 1; }

/* Theme toggle */

/* Mobile */
@media (max-width: 1024px) {
  .nav-links .nav-item,
  .nav-text-link,
  .nav-divider,
  .nav-index { display: none; }
}

/* =============================================
   DRAWER-OPEN OVERRIDES
   Forces nav elements dark when drawer is behind
   ============================================= */
body.drawer-open .nav-item,
body.drawer-open .nav-text-link,
body.drawer-open .nav-divider,
body.drawer-open .nav-icon-btn,
body.drawer-open .top-nav:not(.scrolled) .nav-icon-btn,
body.drawer-open .top-nav:not(.scrolled) .nav-item,
body.drawer-open .top-nav:not(.scrolled) .nav-text-link {
  color: #1F1F23 !important;
}
body.drawer-open .nav-item.is-drawer-active {
  color: #1F1F23 !important;
}
body.drawer-open .nav-logo img {
  filter: none !important;
}
body.drawer-open .nav-index {
  color: rgba(31,31,35,0.6) !important;
}
body.drawer-open .nav-index-dot {
  box-shadow: 0 0 6px rgba(163, 230, 53, 0.4);
}
body.drawer-open .nav-cta {
  border-color: rgba(31,31,35,0.2) !important;
  color: #1F1F23 !important;
}

/* =============================================
   SIDE DRAWER
   ============================================= */
.drawer-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 98; pointer-events: none;
  transition: background 0.45s ease;
}
.drawer-scrim.is-active {
  background: rgba(0,0,0,0.3);
  pointer-events: auto;
}

.side-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(860px, 96vw);
  background: #f8f5e7;
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: -20px 0 60px rgba(0,0,0,0.06);
}
.side-drawer.is-open { transform: translateX(0); }

.side-drawer-spacer {
  height: 72px; flex-shrink: 0;
  border-bottom: 1px solid rgba(128,128,128,0.08);
}

.side-drawer-body {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: row;
}

/* Left sidebar nav */
.sd-sidebar {
  display: none;
}
.sd-sidebar-nav { display: flex; flex-direction: column; gap: 0; }
.sd-sidebar-item {
  font-family: var(--font-display, 'Signifier', Georgia, serif);
  font-size: 22px; font-weight: 300; letter-spacing: -0.01em;
  color: rgba(14,14,17,0.25);
  padding: 14px 0;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.16,1,0.3,1);
  text-decoration: none; display: block;
}
.sd-sidebar-item:hover, .sd-sidebar-item.is-active {
  color: rgba(14,14,17,0.95);
}
.sd-sidebar-bottom {
  display: flex; flex-direction: column; gap: 8px;
}
.sd-sidebar-bottom a {
  font-size: 13px; color: rgba(14,14,17,0.35);
  text-decoration: none; transition: color 0.2s;
}
.sd-sidebar-bottom a:hover { color: rgba(14,14,17,0.8); }

/* Right content area */
.sd-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.side-drawer-panel { display: none; padding: 36px 44px 56px; }
.side-drawer-panel.is-active { display: block; }

/* Per-panel backgrounds */
.side-drawer[data-active-panel="research"] { background-color: #f8f5e7; }
.side-drawer[data-active-panel="events"] { background-color: #f8f5e7; }
.side-drawer[data-active-panel="scholars"] { background-color: #f8f5e7; }
.side-drawer[data-active-panel="about"] { background-color: #f8f5e7; }

/* Labels */
.sd-label {
  font-family: var(--font-body); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-muted); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.sd-label::before {
  content: ''; width: 16px; height: 1px;
  background: var(--text-muted); flex-shrink: 0;
}

/* Link list */
.sd-links { display: flex; flex-direction: column; margin-bottom: 36px; }
.sd-link {
  display: flex; align-items: center; gap: 0;
  padding: 14px 0; font-family: var(--font-heading);
  font-size: 22px; font-weight: 400; color: #1F1F23;
  border-bottom: 1px solid rgba(128,128,128,0.08);
  transition: padding-left 0.25s ease;
}
.sd-link:first-child { border-top: 1px solid rgba(128,128,128,0.08); }
.sd-link:hover { padding-left: 6px; }
.sd-link-arrow {
  width: 16px; height: 16px; color: var(--text-muted);
  opacity: 0; transform: translateX(-6px);
  transition: all 0.2s ease; margin-left: auto;
}
.sd-link:hover .sd-link-arrow { opacity: 0.5; transform: translateX(0); }
.sd-link-count {
  font-family: var(--font-body); font-size: 10px;
  color: var(--text-muted); margin-left: 6px; opacity: 0.5;
}

/* Featured cards */

/* CTA button */
.sd-cta { margin-top: 28px; }
.sd-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  color: #1F1F23; padding: 10px 20px;
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: 3px;
  transition: all 0.25s ease; letter-spacing: 0.02em;
}
.sd-cta a:hover { background: #1F1F23; color: #f0ebe4; border-color: #1F1F23; }
.sd-cta a svg { width: 13px; height: 13px; }

/* Drawer footer */
.side-drawer-footer {
  display: none; /* Footer content moved into sidebar bottom */
}

/* Mobile: collapse sidebar */
@media (max-width: 600px) {
  .sd-sidebar { display: none; }
  .sd-sidebar-nav { flex-direction: row; gap: 4px; flex-wrap: wrap; }
  .sd-sidebar-item { font-size: 16px; padding: 8px 12px; }
  .sd-sidebar-bottom { display: none; }
  .side-drawer-body { flex-direction: column; }
  .sd-content { flex: 1; }
  .side-drawer-panel { padding: 24px 20px 40px; }
}

/* =============================================
   DARK MODE NAV FIXES
   ============================================= */

/* Dark mode: hamburger should be light (white) */
/* Inner pages dark mode: still show white hamburger */

/* Drawer-open: force ALL nav icons dark with max specificity */
body.drawer-open .nav-icon-btn,
body.drawer-open .top-nav .nav-icon-btn,
body.drawer-open .top-nav:not(.scrolled) .nav-icon-btn,
body.drawer-open .top-nav.scrolled .nav-icon-btn {
  color: #1F1F23 !important;
}
body.drawer-open .nav-icon-btn svg,
  stroke: #1F1F23 !important;
  color: #1F1F23 !important;
/* Drawer-open: hamburger shows X which should be dark */
body.drawer-open .nav-hamburger .ham-x line {
  stroke: #1F1F23 !important;
}


/* =============================================
   GLOBAL SEARCH MODAL (shared across all pages)
   ============================================= */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.search-modal-overlay.is-open {
  display: block;
  opacity: 1;
  visibility: visible;
}
.search-modal {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: min(680px, 94vw);
  max-height: 80vh;
  background: #0f0f11;
  border-radius: 20px;
  overflow: hidden;
  z-index: 10001;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 40px 80px rgba(0,0,0,0.5),
    0 0 1px rgba(255,255,255,0.1) inset;
  flex-direction: column;
}
.search-modal-overlay.is-open .search-modal {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Search Header */
.search-modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-modal__input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-modal__icon {
  width: 20px;
  height: 20px;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.search-modal__input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 17px;
  color: #fff;
  font-family: var(--font-body);
  outline: none;
}
.search-modal__input::placeholder {
  color: rgba(255,255,255,0.35);
}
.search-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.search-modal__close:hover {
  background: rgba(255,255,255,0.12);
}
.search-modal__close svg {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.5);
}
.search-modal__kbd {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-body);
}

/* Segmented Toggle */
.search-modal__toggle {
  display: flex;
  padding: 6px;
  margin: 16px 24px 0;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  gap: 4px;
}
.search-modal__toggle-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.search-modal__toggle-btn:hover {
  color: rgba(255,255,255,0.7);
}
.search-modal__toggle-btn.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.search-modal__toggle-btn svg {
  width: 16px;
  height: 16px;
}
.search-modal__toggle-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(99,102,241,0.3);
  color: #a5b4fc;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Search Body */
.search-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.search-modal__body::-webkit-scrollbar { width: 6px; }
.search-modal__body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

/* View containers */
.search-view { display: none; }
.search-view.active { display: block; }

/* Results View */
.search-results__group {
  margin-bottom: 28px;
}
.search-results__group:last-child {
  margin-bottom: 0;
}
.search-results__group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.search-results__group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.search-results__group-count {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}
.search-results__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Result Item */
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.search-result:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.search-result__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-result__icon svg {
  width: 18px;
  height: 18px;
}
.search-result__icon--research {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}
.search-result__icon--scholar {
  background: rgba(168,85,247,0.15);
  color: #c4b5fd;
}
.search-result__icon--event {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
}
.search-result__icon--media {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}
.search-result__content {
  flex: 1;
  min-width: 0;
}
.search-result__title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.35;
}
.search-result__title mark {
  background: rgba(163,230,53,0.25);
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
}
.search-result__meta {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-result__excerpt {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result__arrow {
  width: 20px;
  height: 20px;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  align-self: center;
  transition: transform 0.2s, color 0.2s;
}
.search-result:hover .search-result__arrow {
  color: rgba(255,255,255,0.5);
  transform: translateX(2px);
}

/* Media results - visually distinct */
.search-results__group--media .search-result {
  background: rgba(251,191,36,0.03);
  border-color: rgba(251,191,36,0.08);
}
.search-results__group--media .search-result:hover {
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.15);
}

/* AI Answer View */
.ai-answer {
  padding: 8px 0;
}
.ai-answer__thinking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(99,102,241,0.08);
  border-radius: 12px;
  margin-bottom: 20px;
}
.ai-answer__thinking-dots {
  display: flex;
  gap: 4px;
}
.ai-answer__thinking-dots span {
  width: 6px;
  height: 6px;
  background: #818cf8;
  border-radius: 50%;
  animation: thinking-pulse 1.4s ease-in-out infinite;
}
.ai-answer__thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-answer__thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinking-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}
.ai-answer__thinking-text {
  font-size: 14px;
  color: #a5b4fc;
}
.ai-answer__content {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.85);
}
.ai-answer__content p {
  margin-bottom: 16px;
}
.ai-answer__content p:last-child {
  margin-bottom: 0;
}
.ai-answer__citation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
  border-radius: 4px;
  vertical-align: super;
  margin: 0 2px;
  cursor: pointer;
  transition: background 0.2s;
}
.ai-answer__citation:hover {
  background: rgba(99,102,241,0.35);
}
.ai-answer__sources {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ai-answer__sources-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.ai-answer__source {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.ai-answer__source:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.ai-answer__source-num {
  width: 22px;
  height: 22px;
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-answer__source-info {
  flex: 1;
  min-width: 0;
}
.ai-answer__source-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-answer__source-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.ai-answer__source-arrow {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* Empty / Initial State */
.search-empty {
  text-align: center;
  padding: 48px 24px;
}
.search-empty__icon {
  width: 48px;
  height: 48px;
  color: rgba(255,255,255,0.15);
  margin: 0 auto 16px;
}
.search-empty__title {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.search-empty__hint {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

/* Quick tags */
.search-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  justify-content: center;
}
.search-quick-tag {
  padding: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.search-quick-tag:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.15);
}


/* ====== DRAWER TABS (mobile only — hidden when nav items visible) ====== */
.sd-tabs {
  display: none;
  gap: 0;
  padding: 0 44px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sd-tab {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(31,31,35,0.4);
  background: none;
  border: none;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.sd-tab:hover { color: rgba(31,31,35,0.7); }
.sd-tab.is-active {
  color: #1F1F23;
  border-bottom-color: #1F1F23;
}
@media (max-width: 1024px) {
  .sd-tabs { display: flex; }
}
@media (max-width: 600px) {
  .sd-tabs { padding: 0 24px; }
  .sd-tab { font-size: 12px; padding: 12px 12px; }
}
