/* Container max widths */
.header-container,
.footer-container,
.main-container,
.selector,
.tabs {
  max-width: 74rem; /* 1184px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem; /* 16px */
  padding-right: 1rem;
}

.header-container {
  display: flex;
  justify-content: space-between;
}

.header-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: none;
}

/* Section-specific tweaks */
.selector {
  margin: 1.5rem auto;
}

.selector-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Main tab area */
.tab {
  font-size: 1.125rem; /* text-lg */
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  background: none;
  transition: all 0.3s ease;
}

.tab:hover {
  color: #1d4ed8;
}

.active {
  color: #1d4ed8;
  border-color: #1d4ed8;
}

.tabs {
  margin-bottom: 1.25rem;
}

/* Content and layout */
.tab-content {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hidden {
  display: none;
}

/* Header + Footer */
.header,
.footer {
  width: 100%;
  background: linear-gradient(to right, #2563eb, #7c3aed);
  color: white;
  padding-top: 2rem;
  padding-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
}

.card-pre {
  font-size: 0.875rem;
  white-space: pre-wrap;
  overflow: hidden;
}

/* Section titles (Results, Demographic Analysis) */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 0.75rem;
}

/* Buttons */
.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  min-width: 160px;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.button-primary:hover {
  background: #dbeafe;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  min-width: 120px;
  border: 1px solid white;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.3s;
}

.button-secondary:hover {
  background: #2563eb;
}

/* Icons inside buttons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Charts and figures */
figure {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

/* Chart images and result images */
img {
  max-width: 100%; /* Important: replicate max-w-full */
  height: auto;
  display: block;
  margin: 0 auto;
}
