* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc;
  color: #334155;
  padding: 2rem;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

h3 {
  margin: 10px 0 8px;
  font-size: 1rem;
  color: #1e293b;
}

.subtitle {
  text-align: center;
  color: #64748b;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.chart-container,
.discussion-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.chart-description {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.writeup {
  color: #475569;
}

.writeup p {
  margin: 8px 0;
  line-height: 1.6;
}

.writeup ol,
.writeup ul {
  margin: 8px 0 8px 20px;
}

.writeup li {
  margin: 6px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid #d1d5db;
  padding: 8px;
  text-align: left;
}

th {
  background: #f3f4f6;
}

.button-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 0.75rem 0 0.5rem;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  font-family: "Inter", sans-serif;
}

.btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn:active {
  transform: translateY(1px);
}

.btn.active {
  border-color: #1e293b;
  color: #1e293b;
  background: #e2e8f0;
}

.btn.is-active {
  border-color: #1e293b;
  color: #1e293b;
  background: #e2e8f0;
}

#scatterplot_1 {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  margin-top: 10px;
}

.hidden {
  display: none;
}

.note {
  margin: 8px 0 12px;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}

.tooltip {
  position: absolute;
  padding: 8px 12px;
  background: #1e293b;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
}

.axis-label {
  font-size: 12px;
  fill: #64748b;
  font-family: "Inter", sans-serif;
}

.dot {
  stroke: #111827;
  stroke-width: 0.4px;
  opacity: 0.9;
}

.legend {
  font-size: 12px;
  fill: #374151;
}

.x-axis path,
.x-axis line,
.y-axis path,
.y-axis line {
  stroke: #e2e8f0;
}

.x-axis text,
.y-axis text {
  fill: #94a3b8;
  font-size: 11px;
  font-family: "Inter", sans-serif;
}

svg {
  display: block;
  margin: 0 auto;
}
