/* New UI theme and components */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; line-height: 1.5; }
/* Reduce rubber-band and tap flash for better touch feel */
html, body { overscroll-behavior-y: none; overscroll-behavior-x: none; }
button, .drawer-btn, .voice-btn, .submit-btn, .attach-btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* Utility: spinner and toast reused in new UI */
.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.12); border-top-color: #06b6d4;
  animation: spin 1s linear infinite; margin-right: 8px; display: inline-block;
}
/* Small inline spinner for header */
.spinner--sm { width: 14px; height: 14px; border-width: 2px; margin: 0 0 0 8px; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { opacity: 0; pointer-events: none; transition: opacity .2s ease; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--background); border: 1px solid var(--border-subtle); color: var(--text-primary); padding: 8px 12px; border-radius: 10px; z-index: 60; }
.toast.show { opacity: 1; }

.modal { border: 0; padding: 0; background: transparent; }
.modal::backdrop { background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }

/* -------------------------------------------------------
   THEME FROM SPEC (Satoshi + Geist, dark/light, layout)
   ----------------------------------------------------- */

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-LightItalic.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-MediumItalic.woff') format('woff');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-BlackItalic.woff') format('woff');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Geist:wght@100..900&display=swap');

/* selection */
::-moz-selection { background: var(--border-color); }
::selection { background: var(--border-color); }

.profile-name,
.profile-bio,
.about-content,
.popup-title,
.popup-description,
.popup-details,
.project-link,
.project-title,
.contact-text,
.footer-form input,
.footer-form textarea,
.footer-form-submit { font-family: var(--font-satoshi); }

:root {
  --background: #141414;
  --foreground: #ebebeb;
  --kbd-background: #222;
  --text-primary: #d4d4d8;
  --text-secondary: #737373;
  --border-color: #404040;
  --border-subtle: #262626;
  --hover-bg: rgba(64, 64, 64, 0.2);
  --font-geist-sans: "geistSans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-geist-mono: "Geist Mono", monospace;
  --font-satoshi: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --transition-time: .2s;
  --transition-ease: ease;
}

[data-theme="light"] {
  --background: #f5f5f5;
  --foreground: #171717;
  --text-primary: #171717;
  --text-secondary: #525252;
  --border-color: #d4d4d4;
  --border-subtle: #e5e5e5;
  --kbd-background: #d4d4d4;
  --hover-bg: rgba(0, 0, 0, 0.05);
}

.geist-mono-font { font-family: "Geist Mono", monospace; font-optical-sizing: auto; font-weight: 300; font-style: normal; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Header sizing vars */
:root { --header-h: 56px; }
@media (min-width: 640px) { :root { --header-h: 68px; } }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
* { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }

.scrollable-content::-webkit-scrollbar { width: 6px; }
.scrollable-content::-webkit-scrollbar-track { background: var(--hover-bg); border-radius: 3px; }
.scrollable-content::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
.scrollable-content::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--hover-bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--border-color); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

[data-theme="light"] ::-webkit-scrollbar-track { background: var(--hover-bg); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border-color); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

body { background-color: var(--background); color: var(--foreground); font-family: var(--font-geist-sans); margin: 0; padding: 0; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-y: hidden; }
body.settings-page { overflow-y: auto; }
body.settings-page .container { padding-top: calc(var(--header-h) + 20px); padding-bottom: 48px; }
/* Keep viewport rigid; scroll inner content only while active */
body.chat-active { overflow-y: hidden; }
/* Prevent background scroll when any modal/drawer is open on touch */
.keybinds-container.active, .drawer.active { overscroll-behavior: contain; touch-action: none; }
a { color: inherit; text-decoration: none; }

/* Layout */
.container { max-width: 92rem; margin: 0 auto; padding-top: 8px; position: relative; min-height: 100dvh; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container { padding-top: calc(var(--header-h) + 12px); } }

.header { position: fixed; top: 0; left: 0; right: 0; z-index: 1300; display: flex; justify-content: space-between; align-items: center; height: 48px; padding: 0 .75rem; width: 100%; font-size: 0.875rem; font-family: var(--font-geist-mono); color: #525252; background: transparent; pointer-events: none; }
.header .drawer-btn { pointer-events: auto; }
.header-right { display: flex; align-items: center; gap: 0.3rem; }
/* Align icons with text inside header buttons */
.drawer-btn { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.drawer-btn svg { width: 16px; height: 16px; display: block; }

/* Small screen header tightening */
@media (max-width: 480px) {
  .header { font-size: 0.8rem; padding: 0 .5rem; }
  .header-right { gap: 4px; }
  /* Spotlight trigger removed */
  .theme-switch { width: 28px; height: 28px; }
  .clock-time { font-size: 0.9rem; }
}

.location { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-family: var(--font-geist-mono); }

.clock { display: flex; align-items: center; position: relative; white-space: nowrap; gap: 8px; }
.clock-time { display:none; }
.hover-bg { position: absolute; inset: -0.25rem; scale: 0.75; opacity: 0; min-width: 100%; min-height: 100%; border-radius: 0.75rem; background-color: #40404033; transition: all 0.15s; }

.hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  padding: 20px 24px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: rgba(23,23,23,0.55);
}
[data-theme="light"] .hero { background: #fff; }
.hero-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
[data-theme="light"] .hero-icon-wrap { background: rgba(15,23,42,0.06); }
.hero-icon { width: 46px; height: 46px; opacity: .9; }
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  max-width: 100%;
}
.hero-title { font-size: 2.2rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
.hero-subtitle { font-size: 1rem; color: var(--text-secondary); line-height: 1.5; }
.hero-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--hover-bg);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    padding: 18px;
  }
  .hero-icon-wrap {
    width: 56px;
    height: 56px;
  }
}

/* Center landing stack */
.layout { display: block; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 300px; display: grid; grid-template-rows: max-content 1fr max-content; gap: 10px; border-right: 1px solid var(--border-subtle); padding: 56px 10px 10px 10px; background: var(--background); transform: translateX(-105%); transition: transform .25s var(--transition-ease); z-index: 1000; }
[data-theme="light"] .sidebar { background: #f9fafb; }
.sidebar.sidebar--open { transform: translateX(0); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.sidebar-backdrop { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0,0,0,0.45); opacity: 0; pointer-events: none; transition: opacity .25s var(--transition-ease); z-index: 900; }
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
[data-theme="light"] .sidebar { background: #fff; }
.sidebar-top { display: grid; }
.sidebar-search-row { display:flex; align-items:center; gap:6px; padding: 6px 8px; border-radius: 10px; background: var(--hover-bg); }
.sidebar-search-icon { color: var(--text-secondary); flex: 0 0 auto; }
.sidebar-search { width: 100%; border: none; background: transparent; color: var(--text-primary); border-radius: 8px; padding: 6px 4px; font-size: 12px; outline: none; }
.sidebar-search::placeholder { color: var(--text-secondary); opacity: .8; }
.sidebar-search-row:focus-within { background: rgba(255,255,255,0.08); }
.sidebar-chats { overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 2px 4px 2px 0; }
.chat-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color var(--transition-time) var(--transition-ease), background-color var(--transition-time) var(--transition-ease);
}
.chat-item:hover { background: var(--hover-bg); border-color: var(--border-subtle); }
.chat-icon-btn {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color .15s ease, color .15s ease;
}
.chat-icon-btn:hover,
.chat-icon-btn[data-picker-open="true"] {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.chat-icon-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.icon-popover {
  position: absolute;
  z-index: 1400;
  background: var(--background);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
[data-theme="light"] .icon-popover {
  box-shadow: 0 16px 34px rgba(15,23,42,0.12);
}
.icon-popover__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.icon-popover__btn svg { width: 16px; height: 16px; }
.icon-popover__btn span { font-size: 0.78rem; }
.icon-popover__btn:hover,
.icon-popover__btn.active {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.chat-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-item-title {
  display: block;
  max-width: 100%;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item-title[role="button"] { cursor: pointer; }
.chat-item-title.expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.chat-item-title:focus-visible {
  outline: 1px solid var(--border-color);
  outline-offset: 2px;
}
.chat-item-sub { font-size: 0.7rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-actions { display: flex; align-items: center; gap: 6px; }
.chat-open, .chat-delete {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.7rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-time) var(--transition-ease), color var(--transition-time) var(--transition-ease);
}
.chat-open:hover, .chat-delete:hover { background: var(--hover-bg); color: var(--text-primary); }
.chat-item-actions select {
  border: 1px solid var(--border-subtle);
  background: var(--background);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.68rem;
}
.sidebar-profile { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; border: none; border-radius: 8px; padding: 8px; background: transparent; color: var(--text-primary); }
.profile-gear { border: none; background: transparent; color: var(--text-secondary); border-radius: 6px; padding: 0; cursor: pointer; display:inline-grid; place-items:center; height: 32px; width: 32px; }
.profile-gear:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.profile-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-subtle); background: var(--hover-bg); }
.profile-name { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.profile-email { font-size: 0.8rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.landing {
  display: grid;
  grid-auto-rows: max-content;
  gap: 20px;
  align-content: flex-start;
  justify-items: stretch;
  min-height: calc(100dvh - var(--header-h) - 120px);
  width: min(100%, 56rem);
  margin: 0 auto;
  padding-bottom: 32px;
}

/* Keep input visible in chat; hide only hero and quick bits handled below */

/* Input Bar */
.message-bar { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; max-width: none; margin: 0; }
.message-input { min-height: 100px; max-height: 120px; width: 100%; border-radius: 12px; border: 1px solid var(--border-color); background-color: #1c1c1c; color: var(--text-primary); padding: 10px 48px 62px 10px; font-family: var(--font-satoshi); font-size: 15px; outline: none; resize: none; overflow: auto; line-height: 1.35; }
.message-input:focus, .message-input:active, .message-input:focus-visible { outline: none; box-shadow: none; background-color: #1f1f1f; }
.input-affordance { position: relative; }
.input-tray { position: absolute; left: 6px; right: 6px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.input-tray-left { display: flex; align-items: center; gap: 6px; }
.input-actions { position: relative; display: flex; gap: 6px; }
.voice-btn, .submit-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--text-secondary); border: none; background: transparent; cursor: pointer; transition: all .15s ease; }
.voice-btn:hover, .submit-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
/* Attach button inside input (left) */
.attach-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--text-secondary); border: none; background: transparent; cursor: pointer; transition: all .15s ease; position: relative; }
.attach-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.attach-badge { position: absolute; right: -6px; top: -6px; height: 14px; min-width: 14px; padding: 0 3px; border-radius: 7px; background: #10b981; color: #0b0b0b; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); }

/* Position submit button to bottom-right inside input */
.input-tray-right { margin-left: auto; }

/* Attachments preview below input */
.attachments-preview { display: none; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; width: 100%; max-width: none; margin: 12px 0 0; max-height: 120px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 2px; touch-action: pan-y; }
.attachment-chip { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--border-subtle); background: rgba(23,23,23,0.5); padding: 6px 8px; border-radius: 10px; overflow: hidden; min-height: 40px; }
[data-theme="light"] .attachment-chip { background: #fff; }
.attachment-thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-subtle); background: var(--hover-bg); display: inline-block; }
.attachment-name { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-meta { font-size: 11px; color: var(--text-secondary); }
.attachment-remove { background: transparent; border: none; color: var(--text-secondary); border-radius: 6px; padding: 4px; cursor: pointer; }
.attachment-remove:hover { background: var(--hover-bg); color: var(--text-primary); }

/* Chat-active layout: keep input at bottom; do NOT hide the input form */
.chat-active .landing { display: contents; }
.chat-active .hero,
.chat-active .quick-actions,
.chat-active .hint { display: none; }
.chat-active .container { padding-bottom: 90px; }
.results { padding-top: 0; display: grid; gap: 12px; margin-right: -1rem; }
.chat-active .results { padding-bottom: 150px; max-height: calc(100dvh - var(--header-h) - 170px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin-right: -1rem; }
.chat-active .message-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: 100%;
  max-width: 52rem;
  margin: 0;
  z-index: 80;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.chat-active .input-affordance {
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: rgba(20,20,20,0.95);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  padding: 6px;
}
[data-theme="light"] .chat-active .input-affordance {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 20px 40px rgba(15,23,42,0.18);
}
.chat-active .message-input {
  min-height: 88px;
  padding: 10px 48px 56px 10px;
  border: none;
  background: transparent;
}
.chat-active .input-tray { bottom: 10px; }
.chat-active .attachments-preview { margin: 12px auto 0; }

/* Ensure results anchor to top under header */
.results { align-content: start; }

/* Results header with query and sources */
.results-header { display: grid; gap: 12px; scroll-margin-top: calc(var(--header-h) + 10px); border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 12px; }
.results-header:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.result-query {
  display: grid;
  gap: 6px;
  width: 100%;
}
.result-query-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-query-text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-query-text[role="button"] { cursor: pointer; }
.result-query-text[role="button"]:hover { color: var(--foreground); }
.result-query-text.expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.result-query-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.result-query-actions--streaming {
  min-height: 20px;
}
.search-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}
.search-status--pending {
  position: relative;
  padding-left: 0;
}
.search-status--empty {
  font-style: italic;
}
.search-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  display: inline-block;
  animation: searchPulse 1.4s ease-in-out infinite;
}
.search-status__item {
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  line-height: 1;
  white-space: nowrap;
}
.search-status--complete .search-status__item {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}
[data-theme="light"] .search-status__item {
  background: rgba(0,0,0,0.04);
}
.result-images { margin-top: 4px; }
.result-images:empty { display: none; }
.results-subgrid { display: grid; gap: 10px; }
.answer-markdown { overflow: hidden; }
.answer-markdown * { max-width: 100%; }
.answer-markdown table { display: block; max-width: 100%; overflow-x: auto; }

.answer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Answer actions and related */
.copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); cursor: pointer; transition: all .15s ease; }
.copy-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.copy-btn.copied { color: #10b981; border-color: #10b98166; background: rgba(16,185,129,0.08); }
.retry-btn svg { transform: rotate(-45deg); }
.query-action-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.query-action-btn:hover { color: var(--text-primary); background: var(--hover-bg); }
.query-action-btn:focus-visible {
  outline: 2px solid var(--border-color);
  outline-offset: 2px;
}
.query-action-icon { width: 14px; height: 14px; display: block; }
.related { display: grid; gap: 6px; }
.related-title { font-size: .9rem; color: var(--text-secondary); font-weight: 600; text-transform: none; }
.related-list { display: grid; gap: 6px; }
.related-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-subtle); color: var(--text-primary); cursor: pointer; transition: background-color .15s ease; }
.related-item:hover { background: var(--hover-bg); }
.related-item .plus { opacity: .8; }

/* Image carousel */
.image-carousel { position: relative; }
.image-track { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 10px; overflow-x: auto; padding: 2px; }
.image-track a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-subtle); background: rgba(23,23,23,0.5); }
[data-theme="light"] .image-track a { background: #fff; }
.image-track img { width: 160px; height: 100px; object-fit: cover; display: block; }
.image-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--background); color: var(--text-primary); cursor: pointer; display: grid; place-items: center; }
.image-nav.left { left: -6px; }
.image-nav.right { right: -6px; }

/* Sources carousel */
.source-carousel { position: relative; margin-top: 8px; }
.source-track { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 10px; overflow-x: auto; }
.source-tile2 { display: grid; gap: 6px; border-radius: 12px; border: 1px solid var(--border-subtle); padding: 10px; color: var(--text-primary); text-decoration: none; background: rgba(23,23,23,0.5); }
[data-theme="light"] .source-tile2 { background: #fff; }
.source-head { display: flex; align-items: center; gap: 8px; }
.source-head img { width: 18px; height: 18px; border-radius: 4px; }
.source-host2 { font-size: 12px; color: var(--text-secondary); }
.source-title2 { font-size: 13px; color: var(--text-primary); line-height: 1.3; }

/* Searching overlay */
.searching-overlay { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,0.25); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 1200; }
.searching-overlay.active { display: grid; }
.banter-loader { position: relative; width: 72px; height: 72px; }
.banter-loader__box { float: left; position: relative; width: 20px; height: 20px; margin-right: 6px; }
.banter-loader__box:before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--foreground); border-radius: 4px; }
.banter-loader__box:nth-child(3n) { margin-right: 0; margin-bottom: 6px; }
.banter-loader__box:nth-child(1):before, .banter-loader__box:nth-child(4):before { margin-left: 26px; }
.banter-loader__box:nth-child(3):before { margin-top: 52px; }
.banter-loader__box:last-child { margin-bottom: 0; }
@keyframes moveBox-1 { 9.0909% { transform: translate(-26px,0);} 18.1818% { transform: translate(0,0);} 27.2727% { transform: translate(0,0);} 36.3636% { transform: translate(26px,0);} 45.4545% { transform: translate(26px,26px);} 72.7272% { transform: translate(26px,0);} 90.909% { transform: translate(-26px,0);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(1) { animation: moveBox-1 4s infinite; }
@keyframes moveBox-2 { 18.1818% { transform: translate(26px,0);} 45.4545% { transform: translate(26px,26px);} 81.8181% { transform: translate(0,26px);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(2) { animation: moveBox-2 4s infinite; }
@keyframes moveBox-3 { 27.2727% { transform: translate(0,0);} 81.8181% { transform: translate(-26px,-26px);} 90.909% { transform: translate(0,-26px);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(3) { animation: moveBox-3 4s infinite; }
@keyframes moveBox-4 { 27.2727% { transform: translate(-26px,-26px);} 36.3636% { transform: translate(0,-26px);} 54.5454% { transform: translate(0,-26px);} 90.909% { transform: translate(-26px,0);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(4) { animation: moveBox-4 4s infinite; }
@keyframes moveBox-5 { 36.3636% { transform: translate(26px,0);} 81.8181% { transform: translate(26px,-26px);} 90.909% { transform: translate(0,-26px);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(5) { animation: moveBox-5 4s infinite; }
@keyframes moveBox-6 { 18.1818% { transform: translate(-26px,0);} 72.7272% { transform: translate(0,26px);} 81.8181% { transform: translate(-26px,26px);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(6) { animation: moveBox-6 4s infinite; }
@keyframes moveBox-7 { 36.3636% { transform: translate(0,0);} 45.4545% { transform: translate(0,-26px);} 54.5454% { transform: translate(26px,-26px);} 90.909% { transform: translate(26px,0);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(7) { animation: moveBox-7 4s infinite; }
@keyframes moveBox-8 { 18.1818% { transform: translate(-26px,0);} 27.2727% { transform: translate(-26px,-26px);} 36.3636% { transform: translate(0,-26px);} 90.909% { transform: translate(26px,0);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(8) { animation: moveBox-8 4s infinite; }
@keyframes moveBox-9 { 81.8181% { transform: translate(-52px,0);} 90.909% { transform: translate(-26px,0);} 100% { transform: translate(0,0);} }
.banter-loader__box:nth-child(9) { animation: moveBox-9 4s infinite; }

/* Quick actions */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  margin: 12px 0 0;
}
.quick-actions:empty { display: none; }
@media (max-width: 640px) {
  .quick-actions { justify-content: center; }
}
.quick-action { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--hover-bg); border: none; color: var(--text-secondary); cursor: pointer; transition: color .15s ease, background-color .15s ease; font-family: var(--font-geist-sans); font-size: 12px; }
.quick-action:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }

/* Results */
.card { border: 1px solid var(--border-subtle); background: rgba(23,23,23,0.6); border-radius: 12px; overflow: hidden; }
[data-theme="light"] .card { background: #fff; }
.card-body { padding: 16px; }
/* removed hover-lift transitions for a calmer UI */
.card--no-border { border: none; background: transparent; }

/* Markdown styling inside answer */
.answer-markdown h2 { font-size: 1.1rem; margin: 8px 0; }
.answer-markdown p { margin: 8px 0; text-indent: 0; }
.answer-markdown p + p { text-indent: 0; }
.answer-markdown { overflow-wrap: anywhere; word-break: break-word; }
.answer-markdown * { max-width: 100%; }
.answer-markdown table { display: block; max-width: 100%; overflow-x: auto; }
.answer-markdown ul { margin: 8px 0 8px 1.25rem; padding-left: 1rem; }
.answer-markdown ol { margin: 8px 0 8px 1.25rem; padding-left: 1rem; }
.answer-markdown ul { margin: 8px 0; padding-left: 18px; }
.answer-markdown li { margin: 4px 0; }
.answer-markdown img { max-width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border-subtle); }
.answer-markdown pre { overflow-x: auto; padding: 10px; background: var(--hover-bg); border: 1px solid var(--border-subtle); border-radius: 8px; }
.answer-markdown code { font-family: var(--font-geist-mono); font-size: 0.9em; }
.answer-markdown blockquote { border-left: 3px solid var(--border-color); margin: 8px 0; padding: 6px 10px; color: var(--text-secondary); }
.answer-markdown a { color: #3b82f6; text-decoration: underline; }
[data-theme="light"] .answer-markdown a { color: #2563eb; }
.sources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.source-tile { display: grid; place-items: center; gap: 8px; border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px; color: var(--text-primary); text-decoration: none; }
.source-tile:hover { background: var(--hover-bg); }
.source-host { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); font-size: 12px; }

/* Citation icons inside markdown (e.g., [1]) */
.cite-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; overflow: hidden; border: 1px solid var(--border-subtle); background: var(--background); vertical-align: text-bottom; }
.cite-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* Responsive, scrollable tables inside markdown */
.answer-markdown table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: 10px; }
.answer-markdown thead { position: relative; }
.answer-markdown th, .answer-markdown td { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); text-align: left; white-space: nowrap; }
.answer-markdown th { background: var(--hover-bg); color: var(--text-primary); font-weight: 600; }
.answer-markdown tr:last-child td { border-bottom: none; }

/* Small device tuning */
@media (max-width: 480px) {
  .answer-markdown { font-size: 0.98rem; }
  .card-body { padding: 12px; }
  .result-query { font-size: 1.25rem; }
  /* Tighter input for small screens */
  .message-input { min-height: 72px; max-height: 96px; padding: 10px 44px 52px 10px; }
  /* Ensure active state stays compact on mobile as well */
  .chat-active .message-input { min-height: 64px; padding: 10px 44px 48px 10px; }
  .chat-active .input-tray { bottom: 8px; }
  /* Single-row, horizontally scrollable attachments on mobile */
  .attachments-preview {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 60px;
    margin: 6px 0 0;
  }
  .attachment-chip { min-width: 180px; }
  /* Sidebar: cover full width on tiny screens */
  .sidebar { width: 92vw; }
  .sidebar.sidebar--open { transform: translateX(0); }
}

/* Chaotic orbit loader (inline) */
.chaotic-orbit {
  --uib-size: 12px;
  --uib-speed: 1.5s;
  --uib-color: var(--text-primary);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--uib-size);
  width: var(--uib-size);
  animation: rotate936 calc(var(--uib-speed) * 1.667) infinite linear;
}
.result-query .chaotic-orbit { margin-left: 12px; }

/* Skeleton placeholders */
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,0.06); border-radius: 8px; }
[data-theme="light"] .skeleton { background: rgba(0,0,0,0.06); }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  background-size: 200% 100%;
  will-change: background-position;
  animation: skeleton-shimmer 2s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.chaotic-orbit::before,
.chaotic-orbit::after {
  content: '';
  position: absolute;
  height: 60%;
  width: 60%;
  border-radius: 50%;
  background-color: var(--uib-color);
  will-change: transform;
  flex-shrink: 0;
}

.chaotic-orbit::before { animation: orbit var(--uib-speed) linear infinite; }
.chaotic-orbit::after { animation: orbit var(--uib-speed) linear calc(var(--uib-speed) / -2) infinite; }

@keyframes rotate936 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes orbit {
  0% { transform: translate(calc(var(--uib-size) * 0.5)) scale(0.73684); opacity: 0.65; }
  5% { transform: translate(calc(var(--uib-size) * 0.4)) scale(0.684208); opacity: 0.58; }
  10% { transform: translate(calc(var(--uib-size) * 0.3)) scale(0.631576); opacity: 0.51; }
  15% { transform: translate(calc(var(--uib-size) * 0.2)) scale(0.578944); opacity: 0.44; }
  20% { transform: translate(calc(var(--uib-size) * 0.1)) scale(0.526312); opacity: 0.37; }
  25% { transform: translate(0%) scale(0.47368); opacity: 0.3; }
  30% { transform: translate(calc(var(--uib-size) * -0.1)) scale(0.526312); opacity: 0.37; }
  35% { transform: translate(calc(var(--uib-size) * -0.2)) scale(0.578944); opacity: 0.44; }
  40% { transform: translate(calc(var(--uib-size) * -0.3)) scale(0.631576); opacity: 0.51; }
  45% { transform: translate(calc(var(--uib-size) * -0.4)) scale(0.684208); opacity: 0.58; }
  50% { transform: translate(calc(var(--uib-size) * -0.5)) scale(0.73684); opacity: 0.65; }
  55% { transform: translate(calc(var(--uib-size) * -0.4)) scale(0.789472); opacity: 0.72; }
  60% { transform: translate(calc(var(--uib-size) * -0.3)) scale(0.842104); opacity: 0.79; }
  65% { transform: translate(calc(var(--uib-size) * -0.2)) scale(0.894736); opacity: 0.86; }
  70% { transform: translate(calc(var(--uib-size) * -0.1)) scale(0.947368); opacity: 0.93; }
  75% { transform: translate(0%) scale(1); opacity: 1; }
  80% { transform: translate(calc(var(--uib-size) * 0.1)) scale(0.947368); opacity: 0.93; }
  85% { transform: translate(calc(var(--uib-size) * 0.2)) scale(0.894736); opacity: 0.86; }
  90% { transform: translate(calc(var(--uib-size) * 0.3)) scale(0.842104); opacity: 0.79; }
  95% { transform: translate(calc(var(--uib-size) * 0.4)) scale(0.789472); opacity: 0.72; }
  100% { transform: translate(calc(var(--uib-size) * 0.5)) scale(0.73684); opacity: 0.65; }
}

/* Stop icon state for submit button */
.submit-btn.stop-active { color: #ef4444; }
.submit-btn.stop-active:hover { background: rgba(239, 68, 68, 0.12); }

/* Drawer (chat manager) */
.drawer-btn { background: transparent; border: none; color: var(--text-secondary); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.drawer-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.btn-icon { padding: 6px; }

/* -------- Auth Modal -------- */
.auth-container { position: fixed; inset: 0; z-index: 1200; display: none; }
.auth-container.active { display: block; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.auth-modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 420px; max-width: 92vw; background: var(--background); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); overflow: hidden; }
.auth-header { display: flex; justify-content: space-between; align-items: center; padding: 14px; border-bottom: 1px solid var(--border-subtle); }
.auth-title { font-weight: 600; color: var(--text-primary); font-family: var(--font-satoshi); }
.auth-close { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; border-radius: 6px; padding: 6px; }
.auth-close:hover { background: var(--hover-bg); color: var(--text-primary); }
.auth-content { padding: 16px; display: grid; gap: 10px; }
.auth-text { color: var(--text-secondary); font-size: 0.95rem; }
.auth-field input { width: 100%; border: 1px solid var(--border-color); background: #1c1c1c; color: var(--text-primary); border-radius: 10px; padding: 10px 12px; font-family: var(--font-satoshi); }
[data-theme="light"] .auth-field input { background: #fff; }
.auth-field input:focus,
.auth-field input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: var(--border-color);
}
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-color); cursor: pointer; color: var(--text-primary); background: transparent; }
.btn.primary { background: #3f3f46; border-color: #525252; color: var(--foreground); font-weight: 600; }
[data-theme="light"] .btn.primary { background: #e5e5e5; border-color: #d4d4d4; color: #171717; }
.btn.secondary { background: transparent; }
.btn.oauth { background: #fff; color: #0b0b0b; border-color: #e5e5e5; }
[data-theme="dark"] .btn.oauth { background: #ffffff; color: #0b0b0b; }
.btn:hover { filter: brightness(1.05); }
.auth-divider { text-align: center; position: relative; margin: 12px 0; color: var(--text-secondary); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border-subtle); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* -------- Auth Page (dedicated) -------- */
.auth-page { display: grid; align-content: center; justify-items: center; min-height: 100dvh; padding-top: calc(var(--header-h) + 20px); gap: 18px; }
.auth-card { width: 420px; max-width: 92vw; }
.auth-title-xl { font-weight: 600; font-size: 1.35rem; color: var(--text-primary); margin-bottom: 6px; }
.auth-subtle { color: var(--text-secondary); margin-bottom: 10px; }
.auth-card .card-body { display: grid; gap: 12px; }
.auth-field { margin: 8px 0; }

/* -------- Settings Page -------- */
.settings-shell { display: grid; grid-template-columns: 240px 1fr; gap: 16px; margin-top: 8px; align-items: flex-start; min-height: calc(100dvh - var(--header-h)); width: 100%; }
.settings-aside { border: none; border-radius: 12px; padding: 10px; background: transparent; height: max-content; position: sticky; top: calc(var(--header-h) + 10px); }
[data-theme="light"] .settings-aside { background: transparent; }
.settings-group { font-family: var(--font-geist-mono); font-size: 12px; color: var(--text-secondary); margin: 8px 2px 6px; text-transform: uppercase; letter-spacing: .05em; }
.settings-item { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: transparent; color: var(--text-primary); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.settings-item:hover { background: transparent; }
.settings-item.active { background: transparent; font-weight: 600; }
/* iOS-style toggle for chat settings */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #3f3f46; transition: .2s; border-radius: 999px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: #10b981; }
.switch input:checked + .slider:before { transform: translateX(20px); }
.settings-item.destructive { color: #ef4444; }
.settings-item .icon { width: 18px; height: 18px; display: inline-grid; place-items: center; }
.settings-content { display: grid; gap: 12px; align-content: start; min-height: 0; }

@media (min-width: 900px) {
  body.settings-page .settings-content {
    max-height: calc(100dvh - var(--header-h) - 32px);
    overflow-y: auto;
    padding-right: 8px;
  }
}

/* Buttons for settings actions */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-color); background: transparent; color: var(--text-primary); cursor: pointer; }
.btn.danger-outline { border-color: #ef4444; color: #ef4444; }
.btn.secondary-outline { border-color: var(--border-color); color: var(--text-secondary); }

@media (max-width: 800px) {
  .settings-shell { grid-template-columns: 1fr; gap: 12px; }
  .settings-aside { position: static; padding: 6px 0; }
}

/* Theme switch */
.theme-switch { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.375rem; border: 1px solid var(--background); background-color: transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.15s ease; position: relative; overflow: hidden; }
.theme-switch:hover { background-color: var(--hover-bg); }
.theme-icon { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; }
/* Theme icon toggling to avoid overlap */
.theme-icon .sun-circle, .theme-icon .sun-rays { display: none; }
.theme-icon .moon-path { display: block; }
[data-theme="light"] .theme-icon .sun-circle, [data-theme="light"] .theme-icon .sun-rays { display: block; }
[data-theme="light"] .theme-icon .moon-path { display: none; }

/* Spotlight trigger removed */

/* Spotlight removed */

/* Modal base styles reused for Settings */
.keybinds-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1100; display: none; }
.keybinds-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
[data-theme="light"] .keybinds-backdrop { background-color: rgba(0,0,0,0.2); }
.keybinds-modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 550px; max-width: 90%; max-height: 90vh; background-color: var(--background); border-radius: 12px; border: 1px solid var(--border-subtle); overflow: hidden; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); opacity: 0; transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; flex-direction: column; }
.keybinds-container.active .keybinds-modal { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.keybinds-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.keybinds-title { font-family: var(--font-satoshi); font-size: 16px; font-weight: 600; color: var(--text-primary); }
.keybinds-close { background: transparent; border: none; padding: 4px; margin: -4px; color: var(--text-secondary); cursor: pointer; border-radius: 4px; transition: background-color 0.15s ease, color 0.15s ease; display: flex; align-items: center; justify-content: center; }
.keybinds-close:hover { background-color: var(--hover-bg); color: var(--text-primary); }
.keybinds-content { padding: 16px; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; flex: 1; }
.keybinds-content::-webkit-scrollbar { display: none; }
.keybinds-section { margin-bottom: 24px; }
.keybinds-section-title { font-family: var(--font-geist-mono); font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.keybind-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; opacity: 0; animation: fadeIn 0.2s ease forwards; }
.keybind-description { font-family: var(--font-satoshi); font-size: 14px; color: var(--text-primary); }
.keybind-result { font-family: var(--font-satoshi); font-size: 13px; color: var(--text-secondary); }

/* Account fields inside settings */
.account-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.account-field.triple { grid-template-columns: 1fr 1fr auto; }
.account-field input { width: 100%; border: 1px solid var(--border-color); background: #1c1c1c; color: var(--text-primary); border-radius: 10px; padding: 10px 12px; font-family: var(--font-satoshi); }
[data-theme="light"] .account-field input { background: #fff; }

/* Availability badge */
.availability-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 10px; height: 10px; margin-left: 6px; }
.availability-badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.availability-tooltip { position: absolute; top: calc(100% + 8px); right: 0; background-color: var(--background); border: 1px solid var(--border-subtle); color: var(--text-primary); font-family: var(--font-geist-mono); font-size: 0.65rem; padding: 4px 6px; border-radius: 4px; white-space: nowrap; opacity: 0; transform: translateY(-4px); transition: opacity 0.15s ease, transform 0.15s ease; pointer-events: none; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.availability-badge:hover .availability-tooltip { opacity: 1; transform: translateY(0); }
.status-dot--available { background-color: #22c55e; animation: dotPulseGreen 2s ease-in-out infinite; }
.status-dot--employed  { background-color: #f59e0b; animation: dotPulseAmber 2s ease-in-out infinite; }
@keyframes dotPulseGreen { 0%, 100% { box-shadow: 0 0 5px rgba(34,197,94,0.6), 0 0 0 0 rgba(34,197,94,0.18); } 50% { box-shadow: 0 0 8px rgba(34,197,94,0.9), 0 0 0 5px rgba(34,197,94,0.10); } }
@keyframes dotPulseAmber { 0%, 100% { box-shadow: 0 0 5px rgba(245,158,11,0.6), 0 0 0 0 rgba(245,158,11,0.18); } 50% { box-shadow: 0 0 8px rgba(245,158,11,0.9), 0 0 0 5px rgba(245,158,11,0.10); } }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes searchPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}