/* ============================================
   SI9NAL Component Styles
   Buttons, Badges, Cards, Forms, Modals, etc.
   ============================================ */

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent2);
  border-color: var(--accent2);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border2);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--text3);
  background: var(--bg3);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border-color: transparent;
  padding: 8px 14px;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg3);
}

.btn-sm {
  padding: 6px 14px;
  font-size: var(--fs-xs);
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

/* ================================================
   BADGES
   ================================================ */

/* -- Status Badges -- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  line-height: 1;
  white-space: nowrap;
}

.badge-breaking {
  background: var(--accent-glow);
  color: var(--accent2);
  border: 1px solid rgba(240, 78, 35, .25);
  animation: badge-pulse 2.5s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.badge-verified {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, .2);
}

.badge-needs-verification {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(234, 179, 8, .2);
}

.badge-disputed {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, .2);
}

.badge-removed {
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
  text-decoration: line-through;
}

/* -- Reporter Badges -- */
.reporter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.badge-new {
  background: var(--bg3);
  color: var(--text3);
}

.badge-local {
  background: var(--blue-bg);
  color: var(--blue);
}

.badge-trusted {
  background: var(--green-bg);
  color: var(--green);
}

.badge-verified-field {
  background: var(--purple-bg);
  color: var(--purple);
}

.badge-expert {
  background: var(--gold-bg);
  color: var(--gold);
}

/* ================================================
   CARDS (News Report)
   ================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.03);
}

.card-image .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  width: fit-content;
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--text);
  transition: color var(--transition-fast);
}

.card:hover .card-title {
  color: var(--accent2);
}

.card-excerpt {
  font-size: var(--fs-sm);
  color: var(--text2);
  line-height: var(--lh-normal);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.card-footer .evidence-summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text3);
}

.card-footer .evidence-summary span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-footer .card-time {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text3);
}

/* ================================================
   VOTE PANEL (7 Signal Buttons)
   ================================================ */
.vote-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-md);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 58px;
}

.vote-btn:hover {
  background: var(--bg3);
  border-color: var(--border);
}

.vote-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.vote-btn .vote-icon {
  font-size: 18px;
  line-height: 1;
}

.vote-btn .vote-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  transition: color var(--transition-fast);
}

.vote-btn:hover .vote-label,
.vote-btn.active .vote-label {
  color: var(--text);
}

.vote-btn .vote-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text3);
  font-weight: var(--fw-bold);
}

.vote-btn.active .vote-count {
  color: var(--accent2);
}

/* ================================================
   EVIDENCE METER
   ================================================ */
.evidence-meter {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 6px;
  width: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg3);
}

.evidence-meter__segment {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition);
  min-width: 2px;
}

.evidence-meter__segment--photos {
  background: var(--blue);
}

.evidence-meter__segment--sources {
  background: var(--green);
}

.evidence-meter__segment--votes {
  background: var(--accent);
}

.evidence-meter__segment--disputes {
  background: var(--red);
}

.evidence-meter-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
}

.evidence-meter-labels span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.evidence-meter-labels .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ================================================
   MODAL
   ================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: var(--z-modal);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: var(--fs-xl);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text3);
  transition: all var(--transition-fast);
  font-size: 18px;
}

.modal-close:hover {
  background: var(--bg3);
  color: var(--text);
}

.modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* ================================================
   FORMS
   ================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.form-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--fs-base);
  transition: all var(--transition-fast);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--border2);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text3);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: var(--lh-normal);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6862' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text3);
  margin-left: 8px;
  font-weight: 500;
}
.form-hint--warn { color: #f59e0b; }
.form-hint--error { color: var(--red); }

.form-error {
  font-size: var(--fs-xs);
  color: var(--red);
}

/* ================================================
   TOGGLE SWITCH
   ================================================ */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--transition-fast);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text3);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
  background: #fff;
}

.toggle-label {
  font-size: var(--fs-sm);
  color: var(--text2);
}

/* ================================================
   CONTEXT NOTE (Community Notes Style)
   ================================================ */
.context-note {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
  margin: var(--space-md) 0;
}

.context-note__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.context-note__body {
  font-size: var(--fs-sm);
  color: var(--text2);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-md);
}

.context-note__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.context-note__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text3);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.context-note__action-btn:hover {
  border-color: var(--text3);
  color: var(--text);
}

.context-note__action-btn.active-helpful {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-bg);
}

.context-note__action-btn.active-not-helpful {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

/* ================================================
   EVOLUTION TIMELINE
   ================================================ */
.evolution-timeline {
  position: relative;
  padding-left: 28px;
}

.evolution-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item__dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--border2);
  z-index: 1;
  transition: all var(--transition-fast);
}

.timeline-item.active .timeline-item__dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline-item.completed .timeline-item__dot {
  background: var(--green);
  border-color: var(--green);
}

.timeline-item__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}

.timeline-item.active .timeline-item__label {
  color: var(--accent2);
}

.timeline-item__content {
  font-size: var(--fs-sm);
  color: var(--text2);
}

.timeline-item__time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  margin-top: 4px;
}

/* ================================================
   REPORTER CARD
   ================================================ */
.reporter-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.reporter-card:hover {
  background: var(--bg3);
}

.reporter-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg3);
  border: 2px solid var(--border);
}

.reporter-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reporter-card__info {
  flex: 1;
  min-width: 0;
}

.reporter-card__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.reporter-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.reporter-card__score {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--accent2);
  flex-shrink: 0;
}

/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
}

.empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.empty-state__title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.empty-state__text {
  font-size: var(--fs-sm);
  color: var(--text3);
  max-width: 360px;
  line-height: var(--lh-normal);
}

/* ================================================
   TICKER (Breaking News Bar)
   ================================================ */
.ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-ticker);
  background: var(--accent);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
}

.ticker__inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

.ticker__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, .2);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.ticker__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.ticker__separator {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, .5);
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ================================================
   SEARCH BOX
   ================================================ */
.search-box {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-box__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  pointer-events: none;
}

.search-box__input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
}

.search-box__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg);
}

.search-box__input::placeholder {
  color: var(--text3);
}

/* ================================================
   THEME TOGGLE
   ================================================ */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 18px;
}

.theme-toggle:hover {
  background: var(--bg3);
  border-color: var(--border2);
  color: var(--text);
}

/* ================================================
   TAB NAVIGATION
   ================================================ */
.tab-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-nav__item {
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition-fast);
}

.tab-nav__item:hover {
  color: var(--text);
}

.tab-nav__item.active {
  color: var(--accent2);
}

.tab-nav__item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.tab-nav__count {
  margin-left: 6px;
  font-size: 10px;
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  color: var(--text3);
}

.tab-nav__item.active .tab-nav__count {
  background: var(--accent-glow);
  color: var(--accent2);
}

/* ================================================
   LOADING / SKELETON
   ================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================================
   TOOLTIP
   ================================================ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   RICH-TEXT EDITOR (Submit Report content blocks)
   Flat design: toolbar floats above the text area without
   a second container box.
   ============================================================ */
.rich-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  min-width: 0;
}
.rich-editor__toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 0 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: transparent;
}
.rich-editor__sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 6px;
  opacity: 0.6;
}
.rich-btn {
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.rich-btn:hover {
  background: var(--bg3);
  color: var(--text1);
}
.rich-btn:active { transform: scale(0.96); }
.rich-btn b { font-weight: 800; }

/* Override .content-block__text's forced bg/border when it's the
   contenteditable editor area */
.content-block__text.rich-editor__area {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.rich-editor__area {
  flex: 1;
  min-height: 96px;
  padding: 4px 2px;
  color: var(--text1);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  outline: none;
  resize: none;
  -webkit-user-select: text;
  user-select: text;
  caret-color: var(--accent, var(--text1));
}
.rich-editor__area:empty::before {
  content: attr(data-placeholder);
  color: var(--text3);
  pointer-events: none;
  font-style: italic;
}
.rich-editor__area ul,
.rich-editor__area ol {
  padding-left: 22px;
  margin: 6px 0;
}
.rich-editor__area li { margin: 2px 0; }
.rich-editor__area p { margin: 6px 0; }

/* Rendered rich paragraphs in report detail */
.detail__paragraph--rich ul,
.detail__paragraph--rich ol {
  padding-left: 26px;
  margin: 8px 0;
  list-style-position: outside;
}
.detail__paragraph--rich ul { list-style-type: disc; }
.detail__paragraph--rich ol { list-style-type: decimal; }
.detail__paragraph--rich li {
  margin: 3px 0;
  display: list-item;
}
/* Also fix inside the editor itself */
.rich-editor__area ul { list-style-type: disc; list-style-position: outside; }
.rich-editor__area ol { list-style-type: decimal; list-style-position: outside; }
.rich-editor__area li { display: list-item; }
.detail__paragraph--rich b,
.detail__paragraph--rich strong { font-weight: 700; }

/* ============================================================
   COVER IMAGE — submit picker + detail hero
   ============================================================ */
.cover-image-picker {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg2);
  overflow: hidden;
}
.cover-image-picker__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 16px;
  color: var(--text3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
}
.cover-image-picker__dropzone:hover {
  background: var(--bg3);
  color: var(--text1);
}
.cover-image-picker__dropzone i {
  font-size: 26px;
  color: var(--accent);
}
.cover-image-picker__hint {
  font-size: 12px;
  opacity: 0.75;
}
.cover-image-picker__preview {
  position: relative;
  max-height: 260px;
  overflow: hidden;
}
.cover-image-picker__preview img {
  width: 100%;
  height: auto;
  display: block;
}
.cover-image-picker__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-image-picker__remove:hover { background: var(--red); }
.cover-image-picker__status {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text2);
  border-top: 1px solid var(--border);
}
.cover-image-picker__status--ok { color: var(--green, #2e9f68); }
.cover-image-picker__status--error { color: var(--red, #e74c3c); }

/* Detail view hero cover */
.detail__cover {
  margin: -16px -16px 18px;
  max-height: 380px;
  overflow: hidden;
  border-radius: 0;
}
.detail__cover-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ================================================
   MOTION LAYER — Tier 1
   ================================================ */

/* Scroll reveal */
.mo-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.22,.61,.36,1),
              transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.mo-reveal.mo-in {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover lift (apply broadly but gently) */
.report-card,
.news-card,
.feed-card,
.hero-card,
.broadcast-card,
.profile-card,
.stats-card {
  transition: transform .28s cubic-bezier(.22,.61,.36,1),
              box-shadow .28s cubic-bezier(.22,.61,.36,1),
              border-color .28s ease;
}
.report-card:hover,
.news-card:hover,
.feed-card:hover,
.hero-card:hover,
.broadcast-card:hover,
.profile-card:hover,
.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,.28);
}

/* LIVE pulse indicator */
.live-dot,
.live-indicator::before,
[data-live="true"]::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red, #ff3b3b);
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(255,59,59,.6);
  animation: mo-live-pulse 1.8s ease-out infinite;
  vertical-align: middle;
}
@keyframes mo-live-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(255,59,59,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255,59,59,0); }
  100% { box-shadow: 0 0 0 0    rgba(255,59,59,0); }
}

/* Modal open easing (adds spring, keeps .active toggle) */
.modal {
  transition: opacity .3s ease,
              transform .4s cubic-bezier(.22,1.2,.4,1);
  transform: translateY(10px) scale(.98);
}
.modal.active {
  transform: translateY(0) scale(1);
}
.modal-backdrop {
  transition: opacity .3s ease, backdrop-filter .3s ease;
}

/* Toast slide + fade */
.toast,
.notification-toast {
  animation: mo-toast-in .42s cubic-bezier(.22,1.2,.4,1);
}
@keyframes mo-toast-in {
  from { opacity: 0; transform: translateY(-18px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Button ripple */
.btn, button.btn, .cat-btn {
  position: relative;
  overflow: hidden;
}
.mo-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: scale(0);
  animation: mo-ripple .6s ease-out;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes mo-ripple {
  to { transform: scale(2.4); opacity: 0; }
}

/* Tab underline slide */
.tab-link,
.nav-link {
  position: relative;
  transition: color .25s ease;
}
.tab-link::after,
.nav-link::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -2px;
  height: 2px;
  background: var(--accent, #ff3b3b);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.tab-link:hover::after,
.tab-link.active::after,
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Category filter chip press */
.cat-btn {
  transition: transform .2s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.cat-btn:active { transform: scale(.95); }

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mo-reveal,
  .mo-reveal.mo-in,
  .report-card, .news-card, .feed-card, .hero-card,
  .broadcast-card, .profile-card, .stats-card,
  .modal, .toast, .notification-toast,
  .tab-link::after, .nav-link::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .live-dot, .live-indicator::before, [data-live="true"]::before {
    animation: none !important;
  }
}

/* ================================================
   MOTION LAYER — Tier 2
   ================================================ */

/* Vote button bounce */
.vote-btn, .community-vote-btn {
  transition: transform .2s cubic-bezier(.22,1.3,.4,1), background-color .25s ease, color .25s ease;
}
.mo-bounce {
  animation: mo-vote-bounce .55s cubic-bezier(.22,1.35,.4,1);
}
@keyframes mo-vote-bounce {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.28); }
  55%  { transform: scale(.92); }
  100% { transform: scale(1); }
}

/* Avatar rotating gradient ring on hover */
.reporter-card__avatar,
.avatar,
.profile-avatar {
  position: relative;
  isolation: isolate;
}
.reporter-card__avatar::before,
.avatar::before,
.profile-avatar::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(from 0deg,
    #ff3b3b, #ff8a3b, #1a73e8, #2ecc71, #ad1457, #ff3b3b);
  z-index: -1;
  opacity: 0;
  transition: opacity .35s ease;
  animation: mo-ring-spin 6s linear infinite;
  animation-play-state: paused;
}
.reporter-card__avatar:hover::before,
.avatar:hover::before,
.profile-avatar:hover::before {
  opacity: 1;
  animation-play-state: running;
}
@keyframes mo-ring-spin {
  to { transform: rotate(360deg); }
}

/* New report flash (add .mo-new on newly inserted feed items) */
.mo-new {
  animation: mo-new-flash 2.2s ease-out;
}
@keyframes mo-new-flash {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,59,.55), 0 0 18px rgba(255,59,59,.35); background-color: rgba(255,59,59,.06); }
  60%  { box-shadow: 0 0 0 6px rgba(255,59,59,0),  0 0 0 rgba(255,59,59,0); }
  100% { box-shadow: none; background-color: transparent; }
}

/* Streak flame pulse (attach .streak-flame to streak icon) */
.streak-flame,
.streak-icon {
  display: inline-block;
  transform-origin: center bottom;
  animation: mo-flame 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255,140,0,.55));
}
@keyframes mo-flame {
  0%,100% { transform: scale(1)   rotate(-2deg); }
  50%     { transform: scale(1.08) rotate(2deg); }
}

/* Map pin soft ping (doesn't override existing .pin animations) */
.mo-pin {
  position: relative;
}
.mo-pin::after {
  content:"";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: mo-pin-ping 2.2s ease-out infinite;
  opacity: .6;
}
@keyframes mo-pin-ping {
  0%   { transform: scale(.6); opacity: .6; }
  100% { transform: scale(2);  opacity: 0; }
}

/* Open Mic post image grid (up to 4) — uniform cropped cells */
.community-post__images {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  height: 360px;      /* fixed uniform height for grids */
}
.community-post__images img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  display: block;
  background: #0a0f18;
  cursor: pointer;
  transition: transform .35s ease, filter .25s ease;
}
.community-post__images img:hover {
  transform: scale(1.03);
  filter: brightness(1.08);
}
.community-post__images--1 { grid-template-columns: 1fr; }
.community-post__images--2 { grid-template-columns: 1fr 1fr; }
.community-post__images--3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.community-post__images--3 > img:first-child { grid-row: 1 / span 2; }
.community-post__images--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
@media (max-width: 640px) {
  .community-post__images { height: 260px; }
}

/* === Lightbox === */
.mo-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.mo-lightbox.mo-lb-open { opacity: 1; pointer-events: auto; }
.mo-lightbox__img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0,0,0,.7);
  user-select: none;
}
.mo-lightbox__btn {
  position: absolute;
  width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.1); color: #fff;
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
  backdrop-filter: blur(6px);
}
.mo-lightbox__btn:hover { background: rgba(255,255,255,.22); transform: scale(1.05); }
.mo-lightbox__prev { left: 24px; }
.mo-lightbox__next { right: 24px; }
.mo-lightbox__close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 18px; }
.mo-lightbox__counter {
  position: absolute; top: 28px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; background: rgba(0,0,0,.5);
  padding: 6px 14px; border-radius: 999px;
}
@media (max-width: 640px) {
  .mo-lightbox__prev { left: 8px; }
  .mo-lightbox__next { right: 8px; }
  .mo-lightbox__btn { width: 44px; height: 44px; }
}

/* Hero radar pulse — floats top-right of hero section */
#heroSection { position: relative; }
.mo-hero-pulse {
  position: absolute;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  pointer-events: none;
  z-index: 5;
}
.mo-hero-pulse__dot {
  position: absolute; inset: 0; margin: auto;
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle, #ff6b6b 0%, #ff3b3b 70%);
  box-shadow: 0 0 18px rgba(255,59,59,.75);
}
.mo-hero-pulse__ring {
  position: absolute; inset: 0;
  border: 2px solid rgba(255,59,59,.7);
  border-radius: 50%;
  opacity: 0;
  animation: mo-hero-ping 2.8s ease-out infinite;
}
.mo-hero-pulse__ring:nth-child(3) { animation-delay: .9s; }
.mo-hero-pulse__ring:nth-child(4) { animation-delay: 1.8s; }
@keyframes mo-hero-ping {
  0%   { transform: scale(.3); opacity: .9; }
  80%  { opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Reduced motion overrides for tier 2 */
@media (prefers-reduced-motion: reduce) {
  .mo-bounce, .mo-new, .streak-flame, .streak-icon, .mo-pin::after,
  .reporter-card__avatar::before, .avatar::before, .profile-avatar::before,
  .mo-hero-pulse__ring {
    animation: none !important;
  }
}
