body {
  font-family: system-ui, Arial, sans-serif;
  background: #f7f9fa;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 700px;
  margin: 40px auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 32px 24px 32px 24px;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
  color: #2c3e50;
}

form#calc-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group, fieldset.input-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  border: none;
  padding: 0;
}

.input-group label, fieldset legend {
  min-width: 180px;
  font-weight: 500;
  color: #34495e;
}

.input-group input[type="number"],
.input-group select {
  flex: 1 1 120px;
  padding: 6px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 1em;
  background: #f9f9f9;
}

fieldset.input-group {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 12px 10px 12px;
  margin-bottom: 12px;
}

fieldset.input-group legend {
  font-size: 1em;
  color: #2c3e50;
  margin-bottom: 4px;
}

button[type="submit"] {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 0;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

button[type="submit"]:hover {
  background: #1565c0;
}

#results {
  margin-top: 32px;
  background: #f4f8fb;
  border-radius: 8px;
  padding: 20px 16px 24px 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

#summary {
  font-size: 1.1em;
  margin-bottom: 18px;
}

#breakdown-table {
  overflow-x: auto;
  margin-bottom: 18px;
}

#breakdown-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98em;
}

#breakdown-table th, #breakdown-table td {
  border: 1px solid #e0e0e0;
  padding: 6px 10px;
  text-align: right;
}

#breakdown-table th {
  background: #e3eaf2;
  color: #2c3e50;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.chart-controls label {
  font-weight: 500;
  color: #34495e;
}

@media (max-width: 800px) {
  .container {
    padding: 12px 2vw 24px 2vw;
  }
  #growth-chart {
    width: 100% !important;
    height: 240px !important;
  }
}
