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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #222;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.card h2 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.description {
  color: #555;
  margin-bottom: 16px;
}

/* Compact card variant */
.card--compact {
  padding: 16px;
}

.card--compact h2 {
  margin-bottom: 4px;
}

.card--compact .description {
  margin-bottom: 10px;
}

/* Side-by-side finder layout */
.finder-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.finder-left {
  flex: 0 0 auto;
}

.finder-right {
  flex: 1 1 auto;
  min-width: 0;
}

/* Stat inputs grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.stat-grid label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}

.stat-grid input {
  padding: 3px 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.85rem;
  width: 100%;
  min-width: 0;
}

.finder-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

button#search-btn {
  padding: 5px 24px;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

button#search-btn:hover {
  background: #1e40af;
}

button#clear-btn {
  padding: 5px 14px;
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

button#clear-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

/* Results table */
#results-table {
  width: 100%;
  border-collapse: collapse;
}

#results-table th,
#results-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

#results-table thead {
  background: #f9fafb;
  font-size: 0.9rem;
  color: #555;
}

#results-table tbody tr:hover {
  background: #f0f4ff;
}

/* Sliders */
.slider-group {
  margin-bottom: 12px;
}

.slider-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.slider-group input[type="range"] {
  width: 100%;
}

/* Chart */
.chart-container {
  position: relative;
  width: 100%;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 600px) {
  .finder-layout {
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
