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

.tool-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
  margin-top: 0;
  text-align: center;
}

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

.furlough-period {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.furlough-period input[type="date"] {
  flex: 1;
}

.remove-furlough {
  background: #dc3545;
}

.remove-furlough:hover {
  background: #c82333;
}

.info-btn {
  border: none;
  background: none;
  color: #0d6efd;
  cursor: pointer;
  font-size: 1.2em;
}

.info-btn:hover {
  color: #0a58ca;
}

label {
  display: block;
  margin-bottom: 5px;
}

button {
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

.results {
  margin-top: 20px;
}

.result-explanation {
  margin-top: 15px;
  font-size: 0.9em;
  line-height: 1.4;
  max-width: 60ch;
}

.result-explanation p {
  margin-bottom: 0.8em;
}

.result-explanation .explanation-section {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 1rem;
  background: #fafafa;
}

.result-explanation .explanation-section h3 {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 600;
}

.result-explanation .take-home .amount {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 8px;
  border-bottom: 1px solid #ccc;
}

.results-table td {
  text-align: right;
}

.results-table tfoot td {
  font-weight: bold;
}

.rate-change {
  margin-top: 15px;
}

.rate-change-controls {
  display: flex;
  gap: 5px;
  align-items: center;
  margin: 10px 0;
}

.fte-explainer {
  font-size: 0.9em;
  color: #555;
  margin-top: 0.5em;
}

.fte-working {
  margin-top: 0.5em;
}
.fte-working table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5em;
}
.fte-working th,
.fte-working td {
  border-bottom: 1px solid #ccc;
  padding: 4px;
  text-align: right;
}
.fte-working th:first-child,
.fte-working td:first-child {
  text-align: left;
}

.pct-label {
  flex: 1;
  text-align: center;
}

.results p {
  margin: 5px 0;
}

.results .total {
  font-weight: bold;
  margin-top: 10px;
}

.disclaimer {
  font-size: 0.9em;
  color: #555;
}

.note {
  font-size: 0.8em;
  color: #777;
}

.error {
  color: #c00;
  margin: 10px 0;
}

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

@media (max-width: 600px) {
  .tool-container {
    margin: 20px;
    border-radius: 0;
    box-shadow: none;
  }
  .furlough-period {
    flex-direction: column;
  }
  .actions {
    flex-direction: column;
  }
  .actions button {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .results {
    margin-top: 0;
  }
}

.tool-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ensure modals remain hidden when the attribute is set */
.tool-modal[hidden] {
  display: none;
}

.tool-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-height: 90vh;
  overflow: auto;
  width: 95%;
  max-width: 800px;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid #ccc;
  padding: 6px;
  text-align: right;
}
.ledger-table th:first-child,
.ledger-table td:first-child {
  text-align: left;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}
.account-table th,
.account-table td {
  border-bottom: 1px solid #ccc;
  padding: 6px;
  text-align: right;
}
.account-table th:first-child,
.account-table td:first-child {
  text-align: left;
}

footer.site-footer {
  padding: 20px 0;
  text-align: center;
  font-size: 0.9em;
  color: #555;
}

footer.site-footer a {
  color: inherit;
}
