:root {
  --bg: #0b0f19;
  --surface: #111827;
  --border: #1f2937;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --accent: #10b981;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.card {
  width: 100%;
  max-width: 520px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

#calculator-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.full-width {
  grid-column: span 2;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#tax-buffer-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="number"] {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}

input[type="number"]:focus {
  border-color: var(--accent);
}

input[type="range"] {
  accent-color: var(--accent);
  margin-top: 0.25rem;
  cursor: pointer;
}

.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.result-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 500px) {
  #calculator-form, .results {
    grid-template-columns: 1fr;
  }
  .full-width {
    grid-column: span 1;
  }
}
.divider {
  border: 0;
  height: 1px;
  background-color: var(--border);
  margin: 0;
}

.explanation-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.explanation-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.explanation-list strong {
  color: var(--text-primary);
}
