/* Global body styling */
body {
  font-family: Arial, sans-serif;
  background: #FEF6E4; /* warm cream background */
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Calculator card */
.calculator {
  max-width: 1200px;
  margin: 2rem auto;
  background: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: left;
}

/* Header box with logo/title */
.header-box {
  text-align: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.logo {
  max-width: 200px;
  display: block;
  margin: 0 auto 10px;
}

h1 {
  margin: 0;
}

/* Disclaimer styling */
.disclaimer {
  max-width: 800px;
  margin: 1rem auto;
  font-size: 13px;
  color: #666;
  text-align: center;
  font-style: italic;
}

/* Form labels and inputs */
label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Button styling */
button {
  display: block;       /* block element */
  width: auto;          /* shrink to fit content */
  margin: 20px auto;    /* auto left/right centers it */
  padding: 12px 24px;
  background: #3498db;
  color: #fff;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}


button:hover {
  background: #2980b9;
}

/* Result text */
.result {
  display: none; /* hidden until calculation */
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
}

/* Four-column layout for children */
.four-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.four-columns div {
  background: #fafafa;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.four-columns h3 {
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

/* Charts styling */
.charts {
  display: none; /* hidden until calculation */
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.charts canvas {
  max-width: 400px;
  max-height: 300px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
}


/* Back Link Styling */
.back-link {
  margin: 2rem;
  text-align: center;
}

.back-link a {
  grid-column: 1 / -1;
  justify-self: center;
  background: #3498db;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.back-link a:hover {
  background: #2980b9;
}
}

/* Responsive fallback for smaller screens */
@media (max-width: 1024px) {
  .four-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .four-columns {
    grid-template-columns: 1fr;
  }
}
