.disclaimer {
  color: #777;
  font-size: smaller;
}

.calculator {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 15px;
}

.form-group > label, .label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="number"], select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.inline-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-options .option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  margin: 4px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-options .option:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.inline-options .option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 4px; /* square look */
  display: inline-block;
  position: relative;
}

.inline-options .option input[type="radio"]:checked {
  border-color: #2C6E49;
  background: #2C6E49;
}

.inline-options .option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  background: #ffffff;
}

.inline-options .option span {
  user-select: none;
}

.highest-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: normal;
}

.highest-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 4px;
  position: relative;
}

.highest-option input[type="checkbox"]:checked {
  background: #2C6E49;
  border-color: #2C6E49;
}

.highest-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: #fff;
}

.highest-option { position: relative; }

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.info-icon:hover { background: #cbd5e1; }

.info-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 240px;
  max-width: 90vw;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #111827;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-size: 14px;
  line-height: 1.35;
  display: none;
}

.info-popover.show { display: block; }

#calculateButton {
  background-color: #DAEFB4;
  color: black;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
}

#calculateButton:hover {
  background-color: #C4D89A;
}

.result {
  margin-top: 20px;
  padding: 15px;
  background-color: #E4F5C0;
  border-radius: 4px;
  text-align: center;
}

.result h2 {
  margin-top: 0;
  color: black;
}

.amount {
  font-size: 24px;
  font-weight: bold;
  color: #2C6E49;
}

.info {
  font-style: italic;
  color: #7f8c8d;
  font-size: 14px;
}

.total-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

.hidden {
  display: none;
}

/* Structured explanation */
.explain-title { margin: 8px 0 10px; font-size: 16px; }
.explain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  text-align: left;
  margin-top: 8px;
}
.explain-grid .label { color: #6b7280; }
.explain-grid .value { font-weight: 600; }
.explain-notes { margin: 10px 0 0; padding-left: 18px; text-align: left; }
.explain-notes li { margin: 2px 0; }

@media (min-width: 560px) {
  .explain-grid { grid-template-columns: 160px 1fr; }
}