/* ===== Base ===== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f3f4f6;
  margin: 0;
  padding: 0;
  color: #111;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

h1 {
  margin-bottom: 8px;
}

h2 {
  margin-top: 0;
}

p.lead {
  color: #555;
  margin-top: 0;
  margin-bottom: 32px;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.card p {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.card a {
  margin-top: 16px;
  display: inline-block;
  text-decoration: none;
  background: #2563eb;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.card a:hover {
  background: #1d4ed8;
}

/* ===== Buttons ===== */
button {
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

button.primary {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
}

button.primary:hover {
  background: #1d4ed8;
}

/* ===== Forms ===== */
.controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

label {
  font-size: 14px;
}

input[type="text"] {
  padding: 4px 6px;
  font-size: 14px;
}

/* ===== Stats ===== */
.stats-wrap {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

th, td {
  border: 1px solid #ddd;
  padding: 6px 10px;
}

th {
  background: #f0f0f0;
  position: sticky;
  top: 0;
}

/* ===== Plot ===== */
#plot-img {
  display: none;
  margin-top: 16px;
  max-width: 100%;
  border: 1px solid #ccc;
  background: #fff;
}

/* ===== Footer ===== */
footer {
  margin-top: 48px;
  color: #777;
  font-size: 13px;
  text-align: center;
}
