/* ============================================================
   Ask EYYAW v246 — Chat widget (isolé, mobile-first)
   ============================================================ */

/* Scope global : tout est préfixé par .ae- et isolé dans .ae-root */

.ae-root {
  --ae-paper: #FAF8F5;
  --ae-paper-card: #FFFFFF;
  --ae-paper-soft: #F4F1EB;
  --ae-ink: #1A1A1A;
  --ae-ink-70: #3D3D3D;
  --ae-ink-50: #6B6B6B;
  --ae-ink-30: #A0A0A0;
  --ae-ink-10: rgba(26,26,26,0.08);
  --ae-ink-line: rgba(26,26,26,0.12);
  --ae-accent: #B85C38;
  --ae-accent-soft: rgba(184,92,56,0.08);
  --ae-success: #4F7A4F;
  --ae-error: #C41E3A;

  --ae-serif: 'Instrument Serif', Georgia, serif;
  --ae-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --ae-ease: cubic-bezier(0.19, 1, 0.22, 1);
  --ae-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --ae-panel-width: 420px;
  --ae-z-trigger: 9990;
  --ae-z-panel: 9991;
  --ae-z-overlay: 9992;

  font-family: var(--ae-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}
.ae-root *, .ae-root *::before, .ae-root *::after { box-sizing: border-box; }

/* ============================================================
   1. BOUTON FLOTTANT
   ============================================================ */
.ae-trigger {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--ae-z-trigger);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--ae-ink);
  color: var(--ae-paper);
  border: none;
  border-radius: 100px;
  font-family: var(--ae-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26,26,26,0.25), 0 2px 6px rgba(26,26,26,0.1);
  transition: all .3s var(--ae-ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ae-trigger:hover {
  background: var(--ae-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(184,92,56,0.3), 0 2px 8px rgba(26,26,26,0.15);
}

.ae-trigger:active { transform: translateY(0) scale(0.98); }

.ae-trigger-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ae-trigger-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ae-trigger-label { white-space: nowrap; }

/* Sur très petit mobile, ne garder que l'icône */
@media (max-width: 480px) {
  .ae-trigger {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }
  .ae-trigger-label { display: none; }
}

/* Badge "nouveau" sur le trigger */
.ae-trigger-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: var(--ae-accent);
  border: 2px solid var(--ae-paper);
  border-radius: 50%;
  animation: ae-pulse 2s ease-in-out infinite;
}
@keyframes ae-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,92,56,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(184,92,56,0); }
}

.ae-trigger.is-hidden { display: none; }

/* ============================================================
   2. OVERLAY (mobile uniquement)
   ============================================================ */
.ae-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--ae-z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ae-ease);
}
.ae-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   3. PANNEAU PRINCIPAL
   ============================================================ */
.ae-panel {
  position: fixed;
  z-index: var(--ae-z-panel);
  background: var(--ae-paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--ae-sans);
  color: var(--ae-ink);
}

/* ==== MOBILE : bottom sheet ==== */
@media (max-width: 767px) {
  .ae-panel {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 90vh;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(26,26,26,0.2);
    transform: translateY(100%);
    transition: transform .38s var(--ae-ease);
  }
  .ae-panel.is-open { transform: translateY(0); }

  /* Poignée visuelle */
  .ae-panel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--ae-ink-30);
    border-radius: 2px;
    z-index: 5;
  }
}

/* ==== DESKTOP : side panel ==== */
@media (min-width: 768px) {
  .ae-panel {
    right: 20px;
    bottom: 20px;
    top: auto;
    width: var(--ae-panel-width);
    height: 640px;
    max-height: calc(100vh - 40px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(26,26,26,0.25), 0 4px 12px rgba(26,26,26,0.1);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s var(--ae-ease), opacity .35s var(--ae-ease);
  }
  .ae-panel.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ============================================================
   4. HEADER DU PANNEAU
   ============================================================ */
.ae-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--ae-ink-10);
  flex-shrink: 0;
  background: var(--ae-paper);
  position: relative;
  z-index: 2;
}

@media (max-width: 767px) {
  .ae-header { padding-top: 26px; }
}

.ae-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ae-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ae-ink);
  color: var(--ae-paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ae-serif);
  font-size: 16px;
  font-weight: 400;
  flex-shrink: 0;
}

.ae-header-title {
  font-family: var(--ae-serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ae-ink);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ae-header-status {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ae-success);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.ae-header-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.ae-header-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ae-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ae-ink-50);
  cursor: pointer;
  transition: all .2s var(--ae-ease-smooth);
  padding: 0;
}

.ae-icon-btn:hover {
  background: var(--ae-paper-soft);
  color: var(--ae-ink);
  border-color: var(--ae-ink-10);
}

.ae-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ae-icon-btn[aria-label="Effacer la conversation"]:hover {
  color: var(--ae-error);
}

/* ============================================================
   5. CORPS (messages)
   ============================================================ */
.ae-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.ae-body::-webkit-scrollbar { width: 6px; }
.ae-body::-webkit-scrollbar-track { background: transparent; }
.ae-body::-webkit-scrollbar-thumb {
  background: var(--ae-ink-10);
  border-radius: 3px;
}
.ae-body::-webkit-scrollbar-thumb:hover { background: var(--ae-ink-30); }

/* ============================================================
   6. ÉCRAN D'ACCUEIL (suggestions)
   ============================================================ */
.ae-welcome {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0;
  animation: ae-fade-up .4s var(--ae-ease) both;
}

@keyframes ae-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ae-welcome-title {
  font-family: var(--ae-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ae-ink);
  margin: 0;
}

.ae-welcome-title em {
  font-style: italic;
  color: var(--ae-accent);
}

.ae-welcome-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ae-ink-70);
  margin: 0;
}

.ae-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.ae-suggestions-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ae-ink-50);
  margin-bottom: 4px;
}

.ae-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ae-paper-card);
  border: 1px solid var(--ae-ink-10);
  border-radius: 12px;
  color: var(--ae-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: all .2s var(--ae-ease-smooth);
  width: 100%;
}

.ae-suggestion:hover {
  border-color: var(--ae-ink-30);
  background: var(--ae-paper-card);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,26,26,0.04);
}

.ae-suggestion-arrow {
  color: var(--ae-ink-30);
  flex-shrink: 0;
  transition: transform .2s var(--ae-ease);
}

.ae-suggestion:hover .ae-suggestion-arrow {
  transform: translateX(3px);
  color: var(--ae-accent);
}

.ae-suggestion-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ============================================================
   7. MESSAGES
   ============================================================ */
.ae-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: ae-message-in .35s var(--ae-ease) both;
  max-width: 100%;
}

@keyframes ae-message-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* User message */
.ae-message.is-user {
  align-items: flex-end;
}

.ae-message.is-user .ae-message-bubble {
  background: var(--ae-ink);
  color: var(--ae-paper);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.5;
  max-width: 85%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* AI message */
.ae-message.is-ai {
  align-items: flex-start;
}

.ae-message.is-ai .ae-message-bubble {
  background: var(--ae-paper-card);
  color: var(--ae-ink);
  border: 1px solid var(--ae-ink-10);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 92%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Contenu des messages IA */
.ae-message.is-ai .ae-message-bubble p {
  margin: 0 0 10px;
}
.ae-message.is-ai .ae-message-bubble p:last-child {
  margin-bottom: 0;
}
.ae-message.is-ai .ae-message-bubble strong {
  color: var(--ae-ink);
  font-weight: 600;
}
.ae-message.is-ai .ae-message-bubble em {
  font-style: italic;
  color: var(--ae-ink-70);
}
.ae-message.is-ai .ae-message-bubble code {
  background: var(--ae-paper-soft);
  color: var(--ae-accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.ae-message.is-ai .ae-message-bubble a {
  color: var(--ae-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,92,56,0.3);
  transition: border-color .2s;
}
.ae-message.is-ai .ae-message-bubble a:hover {
  border-bottom-color: var(--ae-accent);
}
.ae-message.is-ai .ae-message-bubble ul,
.ae-message.is-ai .ae-message-bubble ol {
  margin: 0 0 10px;
  padding-left: 20px;
}
.ae-message.is-ai .ae-message-bubble li {
  margin-bottom: 4px;
  line-height: 1.5;
}
.ae-message.is-ai .ae-message-bubble li::marker {
  color: var(--ae-ink-50);
}

/* Actions des messages IA */
.ae-message-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .2s;
}
.ae-message.is-ai:hover .ae-message-actions,
.ae-message.is-ai:focus-within .ae-message-actions {
  opacity: 1;
}

/* Sur mobile, toujours visible */
@media (hover: none) {
  .ae-message-actions { opacity: 1; }
}

.ae-message-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--ae-ink-50);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.ae-message-action:hover {
  background: var(--ae-paper-soft);
  color: var(--ae-ink);
}
.ae-message-action svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ae-message-action.is-copied {
  color: var(--ae-success);
}

/* ============================================================
   8. TYPING INDICATOR
   ============================================================ */
.ae-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
  background: var(--ae-paper-card);
  border: 1px solid var(--ae-ink-10);
  border-radius: 18px 18px 18px 4px;
  max-width: 92%;
}

.ae-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--ae-ink-30);
  border-radius: 50%;
  animation: ae-typing 1.4s infinite ease-in-out;
}
.ae-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ae-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ae-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ============================================================
   9. ERREUR
   ============================================================ */
.ae-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(196,30,58,0.06);
  border: 1px solid rgba(196,30,58,0.15);
  border-radius: 10px;
  color: var(--ae-error);
  font-size: 13px;
  line-height: 1.5;
}
.ae-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============================================================
   10. FORMULAIRE DE SAISIE
   ============================================================ */
.ae-input-wrap {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--ae-ink-10);
  background: var(--ae-paper);
  flex-shrink: 0;
}

/* Safe area iOS */
@supports (padding: max(0px)) {
  .ae-input-wrap {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

.ae-input-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--ae-paper-card);
  border: 1px solid var(--ae-ink-line);
  border-radius: 22px;
  transition: all .2s var(--ae-ease-smooth);
}

.ae-input-form:focus-within {
  border-color: var(--ae-ink);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.05);
}

.ae-input {
  flex: 1;
  min-height: 24px;
  max-height: 120px;
  padding: 8px 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ae-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
}
.ae-input::-webkit-scrollbar { display: none; }
.ae-input::placeholder { color: var(--ae-ink-30); }

.ae-send {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ae-ink);
  color: var(--ae-paper);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s var(--ae-ease);
}
.ae-send:hover:not(:disabled) {
  background: var(--ae-accent);
  transform: scale(1.05);
}
.ae-send:disabled {
  background: var(--ae-ink-30);
  cursor: not-allowed;
  opacity: 0.4;
}
.ae-send svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ae-input-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 0 6px;
  font-size: 11px;
  color: var(--ae-ink-50);
  line-height: 1.4;
}
.ae-input-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  background: var(--ae-paper-soft);
  border: 1px solid var(--ae-ink-10);
  border-radius: 3px;
  font-family: inherit;
  font-size: 10px;
  color: var(--ae-ink-70);
}
@media (max-width: 480px) {
  .ae-input-hint { display: none; }
}

/* ============================================================
   11. TOAST
   ============================================================ */
.ae-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  background: var(--ae-ink);
  color: var(--ae-paper);
  font-family: var(--ae-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(26,26,26,0.25);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all .3s var(--ae-ease);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}
.ae-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ae-toast svg {
  width: 16px;
  height: 16px;
  stroke: var(--ae-success);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   12. ACCESSIBILITÉ
   ============================================================ */
.ae-trigger:focus-visible,
.ae-icon-btn:focus-visible,
.ae-send:focus-visible,
.ae-suggestion:focus-visible {
  outline: 2px solid var(--ae-accent);
  outline-offset: 2px;
}

.ae-root [aria-hidden="true"] {
  display: none !important;
}

/* Réduire les animations */
@media (prefers-reduced-motion: reduce) {
  .ae-root *, .ae-root *::before, .ae-root *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ae-trigger-badge { animation: none; }
}

/* Empêcher le scroll du body quand le panneau est ouvert (mobile) */
body.ae-body-locked {
  overflow: hidden !important;
  position: relative !important;
}



/* ============================================================
   Ask EYYAW v251 — Affichage progressif + sources
   ============================================================ */

/* Answer : lead visible + reste repliable */
.ae-root .ae-answer {
  position: relative;
}

.ae-root .ae-answer-lead p {
  margin: 0 0 8px;
}
.ae-root .ae-answer-lead p:last-child {
  margin-bottom: 0;
}

/* Le contenu repliable */
.ae-root .ae-answer-more {
  position: relative;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--ae-ink-10, rgba(26,26,26,0.08));
  animation: ae-expand .3s cubic-bezier(0.19, 1, 0.22, 1);
}
.ae-root .ae-answer-more[hidden] {
  display: none;
}

@keyframes ae-expand {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bouton "Lire la suite" */
.ae-root .ae-answer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px 6px 10px;
  background: var(--ae-paper-soft, #F4F1EB);
  border: 1px solid var(--ae-ink-10, rgba(26,26,26,0.08));
  border-radius: 100px;
  color: var(--ae-ink, #1A1A1A);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ae-ease-smooth);
}
.ae-root .ae-answer-toggle:hover {
  background: var(--ae-paper-card, #FFFFFF);
  border-color: var(--ae-ink-30, #A0A0A0);
  color: var(--ae-accent, #B85C38);
}
.ae-root .ae-answer-toggle-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  transition: transform .25s var(--ae-ease);
}
.ae-root .ae-answer-toggle-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   Sources en cartes
   ============================================================ */
.ae-root .ae-sources {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ae-ink-10, rgba(26,26,26,0.08));
}

.ae-root .ae-sources-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ae-ink-50, #6B6B6B);
  margin-bottom: 8px;
}

.ae-root .ae-sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ae-root .ae-source-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ae-paper-soft, #F4F1EB);
  border: 1px solid var(--ae-ink-10, rgba(26,26,26,0.08));
  border-radius: 10px;
  transition: all .2s var(--ae-ease-smooth);
}

.ae-root .ae-source-card:hover {
  background: var(--ae-paper-card, #FFFFFF);
  border-color: var(--ae-ink-30, #A0A0A0);
}

.ae-root .ae-source-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ae-paper-card, #FFFFFF);
  border: 1px solid var(--ae-ink-10, rgba(26,26,26,0.08));
  border-radius: 7px;
  color: var(--ae-accent, #B85C38);
}

.ae-root .ae-source-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ae-root .ae-source-body {
  flex: 1;
  min-width: 0;
}

.ae-root .ae-source-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ae-ink, #1A1A1A);
  text-decoration: none;
  transition: color .2s;
}

.ae-root a.ae-source-title:hover {
  color: var(--ae-accent, #B85C38);
}

.ae-root .ae-source-ext {
  display: inline-flex;
  width: 11px;
  height: 11px;
  opacity: 0.4;
  flex-shrink: 0;
}
.ae-root .ae-source-ext svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.ae-root .ae-source-snippet {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ae-ink-50, #6B6B6B);
  margin-top: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}