.calcly-container {
  background: #ffffff;
  color: #1f2937;
  padding: 22px;
  border-radius: 14px;
  max-width: 780px;
  margin: 20px auto;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h2 { font-weight: 700; font-size: 1.6em; margin-bottom: 16px; color: #1e3a8a; }
h3 { font-weight: 600; font-size: 1.2em; color: #1e3a8a; margin: 14px 0 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.collapse-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 10px; }

label { font-weight: 600; font-size: 0.92em; }
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  transition: border-color 0.2s ease, background 0.2s ease;
}
input:focus, select:focus { outline: none; border-color: #2563eb; background: #ffffff; }

details {
  background: #f3f4f6;
  border-radius: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
}
summary { cursor: pointer; font-weight: 700; color: #2563eb; }
details[open] summary { color: #1d4ed8; }

button {
  background: #2563eb; border: none; color: #fff; border-radius: 10px;
  padding: 10px 16px; font-weight: 700; cursor: pointer; margin-top: 16px;
  transition: background 0.2s ease, transform 0.1s ease; box-shadow: 0 3px 10px rgba(37,99,235,0.25);
}
button:hover { background: #1d4ed8; transform: translateY(-1px); }

.results {
  margin-top: 22px; background: #f9fafb; border-radius: 12px; border: 1px solid #e5e7eb; padding: 16px;
}
.summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px;
}
.summary div {
  background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.summary strong { color: #1e3a8a; display:block; }

.period-panel {
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 12px; margin-bottom: 12px;
}
.period-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px;
}
.period-card div {
  background: #ffffff; border: 1px solid #dbeafe; border-radius: 8px; padding: 10px;
}
.period-card strong { display:block; color:#1e3a8a; }
.period-card em { font-style: normal; }
.period-note { margin: 6px 2px 0; font-size: 0.85em; color: #475569; }

.period-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.92em; }
.period-table th, .period-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: right; }
.period-table th:first-child, .period-table td:first-child { text-align: left; }
.period-table tr:last-child td { font-weight: 700; color: #1e3a8a; }

.spinner-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,0.7);
  justify-content: center; align-items: center; z-index: 9999;
}
.spinner {
  width: 56px; height: 56px; border: 6px solid #e5e7eb; border-top: 6px solid #2563eb; border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }

@media (max-width: 640px) {
  .calcly-container { padding: 18px; }
  .summary { grid-template-columns: 1fr; }
}
