:root {
  --primary: #2563eb;
  --text: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --border: #e2e8f0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1100px;
  margin: 16px auto;
  padding: 0 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.container {
  max-width: 600px;
  margin: 48px auto;
  padding: 32px;
  background: #fff;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.form-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-section input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.help-text {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
}

/* Actions */
.form-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

button {
  padding: 14px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
  font-weight: 600;
}

button.secondary-btn {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Result Area */
#result {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 1.1rem;
}

/* Table */
.table-wrapper {
  margin-top: 30px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  background: #f1f5f9;
  font-weight: 600;
}

.note {
  background-color: #fef3c7;
  color: #92400e;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
  border-left: 4px solid #f59e0b;
}

footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Related Calculators & Resources */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.related-links a {
  background: white;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  display: block;
  text-align: center;
}

.related-links a:hover {
  border-color: var(--primary);
  background: #eff6ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  text-decoration: none;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.back-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
}

.back-to-top a:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  background: #1d4ed8;
}
