* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #f7931e;
  --primary-dark: #d47815;
  --bg: #fafaf9;
  --card-bg: #ffffff;
  --text: #1c1917;
  --text-secondary: #57534e;
  --border: #e7e5e4;
  --success: #059669;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, #f7931e 0%, #f59e0b 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 8px;
}

/* Calculator Section */
.calculator-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px;
  margin: -30px 0 30px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.calculator-section h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.calculator-section > p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.1);
}

.form-group small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-secondary {
  background: none;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

#calculate-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

#calculate-btn:hover {
  background: var(--primary-dark);
}

#calculate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Results */
.results-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 30px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.loading {
  text-align: center;
  padding: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.result-card {
  text-align: center;
  padding: 24px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.result-card.highlight {
  border-color: var(--primary);
  background: rgba(247, 147, 30, 0.05);
}

.result-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.result-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.result-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.location-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Breakdown */
.breakdown {
  margin-top: 24px;
}

.breakdown h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

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

.breakdown td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.breakdown td:first-child {
  color: var(--text-secondary);
  width: 50%;
}

.breakdown td:last-child {
  font-weight: 600;
}

.disclaimer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.disclaimer a {
  color: var(--primary);
}

/* Footer */
footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 600px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .calculator-section {
    padding: 24px;
  }
  header h1 {
    font-size: 2rem;
  }
}
