html, body {
  background-color: #FFFFFF;
  color: #111827;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, .font-editorial { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* iOS standalone safe areas */
.safe-top { padding-top: max(env(safe-area-inset-top), 0.75rem); }
aside#sidebar.safe-top { padding-top: max(env(safe-area-inset-top), 1.75rem); }
.safe-bottom { padding-bottom: max(env(safe-area-inset-bottom), 1rem); }

@keyframes starPop { 0% { transform: scale(0.82); } 55% { transform: scale(1.16); } 100% { transform: scale(1); } }
.animate-star-pop { animation: starPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes fadeSlide { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.animate-screen { animation: fadeSlide 0.22s ease-out; }

/* ---------- Section hero header ---------- */
.hero-header { min-height: 4.5rem; display: flex; align-items: flex-end; }
.hero-header img {
  display: block;
  max-height: 168px;
  max-width: min(100%, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left bottom;
}
@media (max-width: 640px) { .hero-header img { max-height: 112px; } }

/* Fallback: clean outlined typographic header in the section accent */
.hero-outlined-text {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.92;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--accent, #111827);
  paint-order: stroke fill;
  user-select: none;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  word-break: break-word;
}
@media (max-width: 640px) { .hero-outlined-text { -webkit-text-stroke-width: 1.8px; } }

.dropzone-active { border-color: var(--accent, #F43F9E) !important; background-color: var(--accent-soft, #FDF2F8) !important; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* On touch screens, hover-only delete buttons are always visible (muted). */
@media (hover: none) {
  .group .hover-reveal { opacity: 0.55 !important; }
}

/* ---------- Sync indicator ---------- */
.sync-dot { width: 6px; height: 6px; border-radius: 9999px; background: #D1D5DB; flex-shrink: 0; }
.sync-ok .sync-dot { background: #10B981; }
.sync-busy .sync-dot { background: #F59E0B; }
.sync-err .sync-dot { background: #EF4444; }

/* ---------- Neon ---------- */
.neon-chip {
  align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.75rem; border-radius: 9999px;
  background: #111827; color: #fff; font-size: 0.75rem; font-weight: 600; cursor: pointer;
  transition: background-color .15s;
}
.neon-chip:hover { background: #374151; }
.neon-chip-lg { padding: 0.625rem 1rem; }
.neon-dot {
  width: 7px; height: 7px; border-radius: 9999px;
  background: conic-gradient(from 0deg, #38BDF8, #8B5CF6, #F43F9E, #F97316, #10B981, #38BDF8);
  box-shadow: 0 0 8px rgba(139, 92, 246, .8);
}
.neon-fab {
  position: fixed; right: 1.25rem; bottom: max(1.25rem, env(safe-area-inset-bottom)); z-index: 55;
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background: #111827; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(17, 24, 39, .45), 0 0 0 4px #fff;
  cursor: pointer; transition: transform .15s ease;
}
.neon-fab:hover { transform: scale(1.05); }
@media (max-width: 1023px) { .neon-fab { display: none; } } /* phones use the header Neon button */
.neon-fab:active { transform: scale(.96); }
.neon-fab::after {
  content: ''; position: absolute; inset: -3px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from 0deg, #38BDF8, #8B5CF6, #F43F9E, #F97316, #10B981, #38BDF8);
  opacity: .9;
}
.neon-avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 0.875rem; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #8B5CF6, #F43F9E 60%, #F97316);
}
.neon-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 65;
  width: min(440px, 100vw); height: 100dvh;
  background: #fff; border-left: 1px solid #F3F4F6;
  box-shadow: -20px 0 50px -20px rgba(17, 24, 39, .25);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.neon-drawer.open { transform: translateX(0); }
.neon-bubble-user { background: #111827; color: #fff; border-radius: 1.125rem 1.125rem 0.375rem 1.125rem; }
.neon-bubble-model { background: #F4F5F7; color: #1F2937; border-radius: 1.125rem 1.125rem 1.125rem 0.375rem; }
.neon-bubble-model p + p, .neon-bubble-model p + ul, .neon-bubble-model ul + p { margin-top: .5rem; }
.neon-bubble-model ul { list-style: disc; padding-left: 1.1rem; }
.neon-bubble-model li + li { margin-top: .15rem; }
.neon-bubble-model strong { font-weight: 700; color: #111827; }
.neon-bubble-model code { font-size: .8em; background: #fff; padding: 0 .25rem; border-radius: .25rem; }
@keyframes neonPulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.neon-typing span { display: inline-block; width: 6px; height: 6px; border-radius: 9999px; background: #9CA3AF; animation: neonPulse 1.2s infinite; }
.neon-typing span:nth-child(2) { animation-delay: .15s; }
.neon-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.shimmer { background: linear-gradient(90deg, #F4F5F7 25%, #ECEEF2 50%, #F4F5F7 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
