@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-Light-ada8ef0b.otf") format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-LightItalic-b5e9acde.otf") format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-Regular-6baf11d6.otf") format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-RegularItalic-5845737d.otf") format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-Medium-66525759.otf") format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-MediumItalic-5a546f9a.otf") format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-Bold-771d7660.otf") format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-BoldItalic-b04dbaeb.otf") format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-Black-3b82bb3e.otf") format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SkolaSans';
  src: url("/assets/SkolaSans-BlackItalic-9b6ec335.otf") format('opentype');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

.font-serif-italic {
  font-family: 'SkolaSans', serif;
  font-style: italic;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Hide the page-level Turbo progress bar while a chat turn is in flight — the in-chat
   optimistic typing bubble already signals progress, so the top bar is redundant noise.
   Scoped to .intake-busy (toggled by intake_controller) so real navigations — switching
   conversations, Start research — still show the bar. */
html.intake-busy .turbo-progress-bar {
  display: none;
}

/* Streaming reply animation (ported from ../as-av copilot): thinking dots until the first
   token, then the text in an .intake-tw span with a blinking .intake-caret that drops once
   the stream settles. Driven by intake_stream_controller on an actively streaming turn. */
.intake-tw { white-space: pre-wrap; }

.intake-caret {
  display: inline-block;
  width: 7px;
  height: 1.02em;
  margin-left: 1px;
  vertical-align: -2px;
  background: currentColor;
  animation: intake-blink 1.05s steps(1) infinite;
}
@keyframes intake-blink { 50% { opacity: 0; } }

.intake-thinking { display: inline-flex; gap: 5px; align-items: center; }
.intake-thinking i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af; /* gray-400 — muted dots against the bubble's gray-900 text */
  animation: intake-bounce 1.15s infinite;
}
.intake-thinking i:nth-child(2) { animation-delay: 0.16s; }
.intake-thinking i:nth-child(3) { animation-delay: 0.32s; }
@keyframes intake-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}
