.widget {
  width: 900px;
  max-width: 100%;
  background: #13343B;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(31, 184, 205, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logoMark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logoText {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-left: 14px;
}

.tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tabActive {
  composes: tab;
  color: #1FB8CD;
  background: rgba(31, 184, 205, 0.1);
}

.spacer {
  flex: 1;
}

.topbarBtn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

/* Question */
.question {
  padding: 28px 40px 22px;
}

.questionText {
  font-size: 28px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  letter-spacing: -0.4px;
}

/* Sources bar */
.sourcesBar {
  padding: 0 40px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sourcesLabel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sourcesCount {
  background: rgba(31, 184, 205, 0.15);
  color: #1FB8CD;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.sourceChips {
  display: flex;
  gap: 8px;
  flex: 1;
}

.sourceChip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.chipFavicon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #2E8A60;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chipFavicon svg {
  width: 9px;
  height: 9px;
}

.chipNum {
  color: #1FB8CD;
  font-weight: 700;
}

/* Answer area */
.answer {
  padding: 24px 40px 28px;
}

.answerHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.sparkleIcon {
  width: 18px;
  height: 18px;
  color: #1FB8CD;
}

.answerLabel {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.answerBody {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

.answerBody p {
  margin-bottom: 16px;
}

.answerBody p:last-child {
  margin-bottom: 0;
}

.answerBody strong {
  font-weight: 700;
  color: #FFFFFF;
}

.citation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(31, 184, 205, 0.15);
  color: #1FB8CD;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: baseline;
  margin: 0 2px;
  cursor: pointer;
  line-height: 1;
}

.citation:hover {
  background: rgba(31, 184, 205, 0.3);
}

/* Source cards */
.sourceCards {
  padding: 0 40px 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sourceCard {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.sourceCard:hover {
  border-color: rgba(31, 184, 205, 0.3);
  background: rgba(31, 184, 205, 0.04);
}

.sourceCardHeader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cardFavicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #2E8A60;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cardFavicon svg {
  width: 11px;
  height: 11px;
}

.cardDomain {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cardNum {
  width: 18px;
  height: 18px;
  background: rgba(31, 184, 205, 0.15);
  color: #1FB8CD;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.cardTitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Related questions */
.related {
  padding: 20px 40px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.relatedLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.relatedItem {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.relatedItem:last-child {
  border-bottom: none;
}

.relatedItem:hover {
  color: #FFFFFF;
}

.plusIcon {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.4);
}
