/* ==========================================================================
   Circl AIMM Overdrive Stylesheet (v2)
   Click-to-start social media landing screen, 16-post qualitative feed,
   minimal ("Original Facebook up") vs extended ("Banner + Original up") AI
   disclosures, inline user comments, split-view rating deck, and zoom modal.
   ========================================================================== */

:root {
  --aimm-ink: oklch(0.21 0.02 255);
  --aimm-ink-muted: oklch(0.46 0.02 255);
  --aimm-surface: oklch(0.996 0.002 255);
  --aimm-bg: oklch(0.955 0.006 250);
  --aimm-border: oklch(0.89 0.01 255);
  --aimm-accent: oklch(0.55 0.19 256);
  --aimm-accent-strong: oklch(0.48 0.2 256);
  --aimm-accent-soft: oklch(0.95 0.03 255);
  --aimm-ai-bg: oklch(0.965 0.022 250);
  --aimm-ai-border: oklch(0.86 0.05 252);
  --aimm-ai-ink: oklch(0.32 0.08 255);
  --aimm-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 260ms;
    animation-timing-function: var(--aimm-ease-out);
  }
}

body.aimm-feed {
  background: var(--aimm-bg);
  color: var(--aimm-ink);
}

.aimm-feed [hidden],
.aimm-floating-tooltip[hidden],
.aimm-scroll-nudge[hidden] {
  display: none !important;
}

/* Subtle 30s Top-Right Social Notification Nudge */
.aimm-scroll-nudge {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 185;
  width: min(350px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 13px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.13);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.28s var(--aimm-ease-out), transform 0.28s var(--aimm-ease-out);
}

@starting-style {
  .aimm-scroll-nudge {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.aimm-scroll-nudge-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eff6ff;
  color: #1877f2;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.aimm-scroll-nudge-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.aimm-scroll-nudge-body strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.aimm-scroll-nudge-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #475569;
}

.aimm-scroll-nudge-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.aimm-scroll-nudge-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.aimm-feed .aimm-comment-sort-label {
  font-size: 13px;
  font-weight: 600;
  color: #65676b;
}

body.aimm-feed .app-container {
  padding-top: 64px;
}

/* Keep full 3-column social layout visible during booting, landing, and feed!
   Only hide sidebars during Rating, Complete, and Error views. */
body.aimm-feed[data-aimm-phase="rate"] .sidebar-left,
body.aimm-feed[data-aimm-phase="rate"] .sidebar-right,
body.aimm-feed[data-aimm-phase="complete"] .sidebar-left,
body.aimm-feed[data-aimm-phase="complete"] .sidebar-right,
body.aimm-feed[data-aimm-phase="error"] .sidebar-left,
body.aimm-feed[data-aimm-phase="error"] .sidebar-right {
  display: none !important;
}

body.aimm-feed[data-aimm-phase="landing"] #participant-feed {
  max-width: 680px;
  padding: 0;
}

body.aimm-feed[data-aimm-phase="rate"] #participant-feed {
  max-width: 1120px;
  padding: 0 16px;
}

body.aimm-feed[data-aimm-phase="complete"] #participant-feed,
body.aimm-feed[data-aimm-phase="error"] #participant-feed {
  max-width: 640px;
  padding: 24px 16px;
}

/* ==========================================================================
   GLOBAL FLOATING HOVER TOOLTIP & "COMING SOON" FEEDBACK
   ========================================================================== */
.aimm-floating-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 450;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  padding: 6px 11px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 290px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.12s ease;
}

.aimm-floating-tooltip.is-coming-soon {
  border-color: rgba(56, 189, 248, 0.45);
}

.aimm-floating-tooltip.is-pulsing {
  background: #0f172a;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(24, 119, 242, 0.35);
}

.aimm-feed .header-search {
  cursor: pointer;
}

.aimm-feed .header-search input {
  cursor: pointer;
  pointer-events: none;
}

.aimm-feed .header-profile {
  cursor: pointer;
}

/* ==========================================================================
   RIGHT SIDEBAR: EXTENDED DETERMINISTIC TRENDING HASHTAGS (NO SUGGESTED FRIENDS)
   ========================================================================== */
.aimm-feed .aimm-trending-card {
  max-height: calc(100vh - 84px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.aimm-feed .aimm-trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aimm-feed .aimm-trending-header i {
  color: #1877f2;
  font-size: 14px;
}

.aimm-feed .aimm-trending-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  gap: 2px;
}

.aimm-feed .aimm-trending-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.14s ease;
}

.aimm-feed .aimm-trending-item:hover,
.aimm-feed .aimm-trending-item:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.aimm-feed .aimm-trending-item .trending-topic {
  color: #1877f2;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
}

.aimm-feed .aimm-trending-item .trending-meta {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.25;
}

.aimm-feed .aimm-post-more-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--aimm-ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.aimm-feed .aimm-post-more-btn:hover {
  background: #f1f5f9;
  color: var(--aimm-ink);
}

/* ==========================================================================
   PHASE 0: TWO-STAGE SOCIAL APP BOOT -> SKELETON -> WELCOME & CONFIRMATION
   ========================================================================== */
.aimm-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.34s var(--aimm-ease-out), visibility 0.34s var(--aimm-ease-out);
}

.aimm-boot-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.aimm-boot-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.aimm-boot-logo-ring {
  padding: 10px;
  border-radius: 26px;
  background: rgba(24, 119, 242, 0.08);
  box-shadow: 0 16px 40px rgba(24, 119, 242, 0.18);
  animation: aimmPulseFloat 2.4s ease-in-out infinite;
}

.aimm-boot-wordmark {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #1877f2, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aimm-boot-progress {
  width: 196px;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 4px;
}

.aimm-boot-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1877f2, #0d9488);
  transform-origin: 0 50%;
  transform: scaleX(0.24);
  transition: transform 0.6s var(--aimm-ease-out);
}

.aimm-boot-caption {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
}

/* Shimmering Social Feed Skeleton Stage */
.aimm-feed .aimm-landing-stage {
  display: grid;
  gap: 14px;
  padding: 8px 12px 36px;
}

.aimm-feed .aimm-skeleton-syncbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--aimm-border);
  border-radius: 999px;
  padding: 9px 18px;
  justify-self: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  font-size: 13.5px;
  font-weight: 600;
  color: #1e40af;
}

.aimm-feed .aimm-skeleton-syncbar.is-ready {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}

.aimm-feed .aimm-sync-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.2px solid #bfdbfe;
  border-top-color: #1877f2;
  animation: aimmSpin 0.8s linear infinite;
}

.aimm-feed .aimm-skeleton-syncbar.is-ready .aimm-sync-spinner {
  animation: none;
  border-color: #14b8a6;
  background: #14b8a6;
}

@keyframes aimmSpin {
  to { transform: rotate(360deg); }
}

.aimm-feed .aimm-skeleton-stack {
  display: grid;
  gap: 14px;
}

.aimm-feed .aimm-skeleton-card {
  pointer-events: none;
}

.aimm-feed .aimm-skel {
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: aimmShimmer 1.35s ease-in-out infinite;
  border-radius: 8px;
}

.aimm-feed .aimm-skel-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
}

.aimm-feed .aimm-skel-lines {
  flex: 1;
  display: grid;
  gap: 7px;
}

.aimm-feed .aimm-skel-body {
  padding: 2px 16px 14px;
  display: grid;
  gap: 8px;
}

.aimm-feed .aimm-skel-line {
  height: 11px;
}

.aimm-feed .aimm-skel-line.w-24 { width: 24%; height: 9px; }
.aimm-feed .aimm-skel-line.w-40 { width: 40%; }
.aimm-feed .aimm-skel-line.w-76 { width: 76%; }
.aimm-feed .aimm-skel-line.w-92 { width: 92%; }

.aimm-feed .aimm-skel-media {
  height: 290px;
  border-radius: 0;
}

.aimm-feed .aimm-skel-footer {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--aimm-border);
}

.aimm-feed .aimm-skel-pill {
  flex: 1;
  height: 28px;
  border-radius: 8px;
}

/* Stage 2: Welcome & Confirmation Dialog Overlaid on Loaded Social Page */
.aimm-welcome-backdrop {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.24s var(--aimm-ease-out);
}

.aimm-welcome-backdrop.is-closing {
  opacity: 0;
  pointer-events: none;
}

.aimm-welcome-dialog {
  width: min(100%, 560px);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  padding: 28px 28px 26px;
  box-shadow: 0 26px 64px rgba(15, 23, 42, 0.26);
  display: grid;
  gap: 20px;
  transform: translateY(0) scale(1);
  transition: transform 0.28s var(--aimm-ease-out), opacity 0.28s var(--aimm-ease-out);
}

@starting-style {
  .aimm-welcome-backdrop {
    opacity: 0;
  }
  .aimm-welcome-dialog {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.aimm-welcome-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.aimm-live-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 700;
}

.aimm-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.aimm-welcome-dialog .aimm-landing-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.aimm-welcome-dialog .aimm-landing-orb {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: oklch(0.96 0.02 250);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@keyframes aimmPulseFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.aimm-welcome-dialog .aimm-landing-title {
  margin: 0;
  font-size: clamp(21px, 2.8vw, 25px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--aimm-ink);
}

.aimm-welcome-dialog .aimm-landing-tagline {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
}

.aimm-welcome-dialog .aimm-landing-copy {
  display: grid;
  gap: 14px;
  font-size: 14.8px;
  line-height: 1.56;
  color: #334155;
}

.aimm-welcome-dialog .aimm-landing-copy p {
  margin: 0;
}

.aimm-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aimm-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
}

.aimm-feature-chip i {
  color: #1877f2;
}

.aimm-welcome-dialog .aimm-landing-prime {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 13px 15px;
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.5;
}

.aimm-welcome-dialog .aimm-landing-prime i {
  margin-top: 3px;
  color: #1877f2;
  font-size: 16px;
  flex-shrink: 0;
}

.aimm-welcome-dialog .aimm-landing-cta {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(24, 119, 242, 0.28);
}

/* ==========================================================================
   SCROLL-DRIVEN PROGRESS & BANNER
   ========================================================================== */
.aimm-scroll-track {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 3px;
  background: oklch(0.91 0.01 255 / 0.65);
  z-index: 90;
  pointer-events: none;
}

.aimm-scroll-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #1877f2, #0d9488);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .aimm-scroll-bar {
      animation: aimmScrollProgress linear both;
      animation-timeline: scroll(root);
    }
    @keyframes aimmScrollProgress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }
}

.aimm-feed #aimm-controls {
  padding: 12px 12px 0;
}

.aimm-feed .aimm-banner {
  background: var(--aimm-surface);
  border: 1px solid var(--aimm-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  padding: 13px 16px;
  margin-bottom: 12px;
  display: grid;
  gap: 6px;
}

.aimm-feed .aimm-banner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.aimm-feed .aimm-test-badge {
  display: inline-flex;
  align-items: center;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.aimm-feed .aimm-step-chip {
  display: inline-flex;
  align-items: center;
  background: var(--aimm-accent-soft);
  color: var(--aimm-accent-strong);
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
}

.aimm-feed .aimm-phase-hint {
  color: var(--aimm-ink);
  font-size: 14px;
  line-height: 1.48;
  font-weight: 500;
  margin: 0;
}

.aimm-feed #aimm-status:not(:empty) {
  color: var(--aimm-ink-muted);
  font-size: 13.5px;
  margin: 0;
}

.aimm-feed #aimm-status.aimm-error {
  color: #dc2626;
  font-weight: 600;
}

/* ==========================================================================
   FEED CARDS, AI DISCLOSURES (MINIMAL & EXTENDED), AND COMMENTS
   ========================================================================== */
.aimm-feed .aimm-timeline {
  display: grid;
  gap: 14px;
  padding: 0 12px 36px;
}

.aimm-feed .aimm-post {
  background: var(--aimm-surface);
  border: 1px solid var(--aimm-border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.aimm-feed .aimm-monogram-avatar {
  font-weight: 700;
  font-size: 14px;
}

.aimm-feed .aimm-meta-dot {
  margin: 0 2px;
}

/* Original Facebook ("only up") inline meta label: subtle grey inline text */
.aimm-feed .aimm-fb-ai-meta {
  color: inherit;
  font-size: inherit;
  font-weight: 500;
}

.aimm-feed .aimm-media-frame {
  position: relative;
  width: 100%;
  background: #e2e8f0;
  overflow: hidden;
}

.aimm-feed .aimm-media-frame.is-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: aimmShimmer 1.4s ease-in-out infinite;
}

@keyframes aimmShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.aimm-feed .aimm-media-frame .post-single-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f8fafc;
  cursor: zoom-in;
}

.aimm-feed .aimm-like-pill {
  background: linear-gradient(135deg, #1877f2, #0d9488);
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
}

/* Extended AI Disclosure Banner beneath Image */
.aimm-feed .aimm-ai-disclosure {
  background: var(--aimm-ai-bg);
  border-top: 1px solid var(--aimm-ai-border);
  border-bottom: 1px solid var(--aimm-ai-border);
  padding: 9px 14px;
  color: var(--aimm-ai-ink);
}

.aimm-feed .aimm-ai-disclosure-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.35;
}

.aimm-feed .aimm-ai-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: oklch(0.52 0.17 256 / 0.14);
  color: var(--aimm-accent-strong);
  flex-shrink: 0;
}

.aimm-feed .aimm-ai-disclosure-copy {
  flex: 1;
  min-width: 0;
}

.aimm-feed .aimm-ai-sep {
  margin: 0 4px;
  opacity: 0.65;
}

.aimm-feed .aimm-ai-info-btn {
  background: #fff;
  color: var(--aimm-ai-ink);
  border: 1px solid var(--aimm-ai-border);
  border-radius: 999px;
  padding: 4px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.aimm-feed .aimm-ai-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s var(--aimm-ease-out);
}

.aimm-feed .aimm-ai-disclosure.is-open .aimm-ai-drawer {
  grid-template-rows: 1fr;
}

.aimm-feed .aimm-ai-drawer-inner {
  overflow: hidden;
}

.aimm-feed .aimm-ai-drawer-inner p {
  margin: 8px 0 2px 32px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--aimm-ink-muted);
}

/* Authentic Social Media Comment Thread & Composer (Facebook / LinkedIn style) */
.aimm-feed .aimm-comment-section {
  border-top: 1px solid var(--aimm-border);
  padding: 10px 16px 14px;
  background: #ffffff;
  display: grid;
  gap: 12px;
}

.aimm-feed .aimm-comment-sort-row {
  display: flex;
  justify-content: flex-start;
}

.aimm-feed .aimm-comment-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  padding: 2px 4px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #65676b;
  cursor: pointer;
}

.aimm-feed .aimm-comment-sort-btn:hover {
  background: #f1f5f9;
  color: #050505;
}

.aimm-feed .aimm-comment-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aimm-feed .aimm-comment-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e4e6eb;
  color: #65676b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aimm-feed .aimm-comment-input-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f2f5;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 4px 6px 4px 14px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.aimm-feed .aimm-comment-input-box:focus-within {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.14);
}

.aimm-feed .aimm-comment-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 5px 0;
  font: inherit;
  font-size: 14px;
  background: transparent;
  color: #050505;
}

.aimm-feed .aimm-comment-input::placeholder {
  color: #65676b;
}

.aimm-feed .aimm-comment-input-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.aimm-feed .aimm-comment-tool-btn,
.aimm-feed .aimm-comment-submit {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #65676b;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.aimm-feed .aimm-comment-tool-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

.aimm-feed .aimm-comment-submit:not(:disabled) {
  color: #1877f2;
}

.aimm-feed .aimm-comment-submit:not(:disabled):hover {
  background: rgba(24, 119, 242, 0.1);
}

.aimm-feed .aimm-comment-submit:disabled {
  opacity: 0.38;
  cursor: default;
}

.aimm-feed .aimm-comment-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 0;
  display: grid;
  gap: 12px;
}

.aimm-feed .aimm-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.aimm-feed .aimm-comment-body-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: calc(100% - 44px);
}

.aimm-feed .aimm-comment-bubble {
  background: #f0f2f5;
  color: #050505;
  border-radius: 16px;
  padding: 8px 13px;
  display: inline-block;
  max-width: 100%;
}

.aimm-feed .aimm-comment-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.aimm-feed .aimm-comment-author {
  font-size: 13px;
  font-weight: 700;
  color: #050505;
}

.aimm-feed .aimm-comment-you-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: #1877f2;
  background: rgba(24, 119, 242, 0.1);
  padding: 1px 6px;
  border-radius: 999px;
}

.aimm-feed .aimm-comment-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.42;
  color: #050505;
  overflow-wrap: break-word;
}

.aimm-feed .aimm-comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 0 0 12px;
  font-size: 12px;
  color: #65676b;
}

.aimm-feed .aimm-comment-time {
  font-size: 12px;
  color: #65676b;
}

.aimm-feed .aimm-comment-meta-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #65676b;
  cursor: pointer;
}

.aimm-feed .aimm-comment-meta-btn:hover {
  text-decoration: underline;
  color: #050505;
}

.aimm-feed .aimm-comment-meta-btn.is-liked {
  color: #1877f2;
}

.aimm-feed .post-action-btn.liked,
.aimm-feed .post-action-btn.commented,
.aimm-feed .post-action-btn.shared {
  color: #1877f2 !important;
  font-weight: 700;
}

/* Zoom Lightbox */
.aimm-zoom-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.aimm-zoom-lightbox img {
  max-width: min(94vw, 1120px);
  max-height: 88vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.aimm-zoom-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

/* End of Timeline & Sticky Frosted Transition Bar */
.aimm-feed .aimm-feed-sentinel {
  height: 2px;
}

.aimm-feed .aimm-feed-endcard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--aimm-surface);
  border: 1px dashed var(--aimm-border);
  border-radius: 14px;
  padding: 14px 18px;
}

.aimm-feed .aimm-feed-endcard-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aimm-feed .aimm-feed-endcard-title {
  margin: 0;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--aimm-ink);
}

.aimm-feed .aimm-feed-endcard-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--aimm-ink-muted);
}

.aimm-feed .aimm-feed-footer {
  position: static;
  display: flex;
  justify-content: center;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--aimm-border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.24s var(--aimm-ease-out), transform 0.24s var(--aimm-ease-out);
}

@starting-style {
  .aimm-feed .aimm-feed-footer {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Primary Buttons */
.aimm-feed .aimm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #1877f2;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s var(--aimm-ease-out), opacity 0.15s ease;
}

.aimm-feed .aimm-btn-wide {
  width: 100%;
}

.aimm-feed .aimm-btn:hover:not(:disabled) {
  background: #1565d8;
}

.aimm-feed .aimm-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.aimm-feed .aimm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Split-View Rating Workspace */
.aimm-feed .aimm-rate-layout {
  display: grid;
  gap: 18px;
  align-items: start;
  padding-bottom: 48px;
}

@media (min-width: 980px) {
  .aimm-feed .aimm-rate-layout {
    grid-template-columns: minmax(380px, 490px) minmax(400px, 1fr);
    gap: 24px;
  }

  .aimm-feed .aimm-rate-post-col {
    position: sticky;
    top: 72px;
  }
}

.aimm-feed .aimm-rate-progress-row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.aimm-feed .aimm-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aimm-feed .aimm-progress-pill {
  display: inline-flex;
  align-items: center;
  background: #e0ecff;
  color: #1557c0;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
}

.aimm-feed .aimm-answered-pill {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--aimm-ink-muted);
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 999px;
}

.aimm-feed .aimm-answered-pill.is-complete {
  background: #dcfce7;
  color: #166534;
}

.aimm-feed .aimm-step-segments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.aimm-feed .aimm-step-segment {
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
}

.aimm-feed .aimm-step-segment.is-done { background: #0d9488; }
.aimm-feed .aimm-step-segment.is-active { background: #1877f2; }

.aimm-feed .aimm-ratings-card,
.aimm-feed .aimm-debrief-card {
  background: var(--aimm-surface);
  border: 1px solid var(--aimm-border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  padding: 22px;
  display: grid;
  gap: 18px;
}

.aimm-feed .aimm-ratings-header {
  display: grid;
  gap: 4px;
}

.aimm-feed .aimm-ratings-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--aimm-ink);
}

.aimm-feed .aimm-ratings-intro {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--aimm-ink-muted);
}

.aimm-feed #aimm-questions {
  display: grid;
  gap: 14px;
}

.aimm-feed .aimm-likert-field {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 15px;
  margin: 0;
  min-inline-size: 0;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.aimm-feed .aimm-likert-field.is-answered {
  border-color: #93c5fd;
  background: #ffffff;
}

.aimm-feed .aimm-likert-legend {
  float: left;
  width: 100%;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--aimm-ink);
  padding: 0;
  margin: 0 0 10px 0;
  line-height: 1.42;
}

.aimm-feed .aimm-likert-legend + * {
  clear: both;
}

.aimm-feed .aimm-q-num {
  color: #1877f2;
  font-weight: 700;
  margin-right: 3px;
}

.aimm-feed .aimm-likert-scale {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.aimm-feed .aimm-likert-option {
  position: relative;
  cursor: pointer;
}

.aimm-feed .aimm-likert-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.aimm-feed .aimm-likert-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  color: #334155;
  transition: transform 0.12s var(--aimm-ease-out), background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.aimm-feed .aimm-likert-option:hover span {
  border-color: #93c5fd;
  background: #eff6ff;
}

body.aimm-feed #participant-feed .aimm-likert-option input:checked + span,
.aimm-feed .aimm-likert-option input:checked + span {
  background: #1877f2 !important;
  border-color: #1877f2 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(24, 119, 242, 0.28);
}

.aimm-feed .aimm-likert-option input:focus-visible + span {
  outline: 2px solid #1877f2;
  outline-offset: 2px;
}

.aimm-feed .aimm-likert-anchors {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 7px;
}

.aimm-feed .aimm-kb-hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 768px) {
  .aimm-feed .aimm-kb-hint {
    display: none;
  }
}

/* Thank You & Redirect Screen */
.aimm-feed .aimm-complete-card {
  text-align: center;
  justify-items: center;
  padding: 36px 26px;
}

.aimm-feed .aimm-complete-card p {
  margin: 0;
  font-size: 15px;
  color: var(--aimm-ink-muted);
}

.aimm-feed .aimm-complete-check {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 26px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Preview Filter Form */
.aimm-feed #aimm-profile {
  display: grid;
  gap: 10px;
  padding: 14px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.aimm-feed #aimm-profile label {
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--aimm-ink-muted);
}

.aimm-feed #aimm-profile select {
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-size: 13.5px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--aimm-border);
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .aimm-feed *,
  .aimm-feed *::before,
  .aimm-feed *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.aimm-feed [hidden] {
  display: none !important;
}
