body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 1.5rem;
  background: #f3f4f6;
}

h1 {
  margin-top: 0;
}

#governing-body-output {
  max-width: 960px;
  margin-top: 1rem;
}

.gb-header {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
}

.gb-header-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.gb-header-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}


/* Wider minimum card width and full-width on small screens */
.group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* was 160px */
  gap: 0.75rem;
  margin-top: 1rem;
}

/* On very small screens, make it a single column so nothing is squashed */
@media (max-width: 600px) {
  .group-list {
    grid-template-columns: minmax(0, 1fr);
  }
}


.group-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}

.group-item:hover {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

.group-item.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

.group-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.group-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Let the text area take remaining space next to color + icon */
.group-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.group-name-line {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.group-short {
  font-size: 0.8rem;
  color: #6b7280;
}

.group-metric {
  font-size: 0.8rem;
  color: #4b5563;
}

.rule-item {
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}

.rule-item.selected {
  border-color: #2563eb;
  background: #eff6ff;
}


/* Highlight suggested (but not yet selected) coalition members */
.group-item.suggested:not(.selected) {
  background: #fef9c3;
}
