/* US Tax Calculator — base styles */

.ustax-wrap {
  max-width: 680px;
  margin: 0 auto;
  font-family: inherit;
}

.ustax-title { margin-bottom: 0.5rem; }

.ustax-lead {
  margin: 0 0 1.25rem;
  color: #555;
  font-size: 0.95rem;
}

/* Form */
.ustax-form {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5rem;
}

.ustax-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .ustax-grid { grid-template-columns: 1fr; }
}

.ustax-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.ustax-grid .ustax-field { margin-bottom: 0; }

.ustax-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.ustax-field select,
.ustax-field input[type="number"],
.ustax-field input[type="text"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.ustax-field select[multiple] { height: auto; padding: 0.25rem; }

.ustax-field select:focus,
.ustax-field input:focus {
  outline: 2px solid #0073aa;
  border-color: #0073aa;
}

/* Advanced section */
.ustax-advanced {
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}

.ustax-advanced summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: #555;
  user-select: none;
}

.ustax-advanced .ustax-field { margin-top: 0.75rem; margin-bottom: 0; }

/* Submit button */
.ustax-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: #0073aa;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.ustax-btn:hover  { background: #005177; }
.ustax-btn:active { background: #003d57; }
.ustax-btn:disabled { background: #aaa; cursor: not-allowed; }

/* Result panel */
.ustax-result {
  margin-top: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.ustax-result__hero {
  background: #0073aa;
  color: #fff;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ustax-result__hero-label  { font-size: 0.9rem; opacity: 0.9; }
.ustax-result__hero-amount { font-size: 1.75rem; font-weight: 700; }

.ustax-result__eff {
  margin: 0;
  padding: 0.625rem 1.5rem;
  background: #e8f4fb;
  font-size: 0.9rem;
  color: #005177;
}

.ustax-result__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ustax-result__table thead th {
  padding: 0.5rem 1.5rem;
  text-align: right;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
  border-bottom: 1px solid #ddd;
  background: #fafafa;
}

.ustax-result__table thead th:first-child { text-align: left; }

.ustax-result__table td {
  padding: 0.55rem 1.5rem;
  border-bottom: 1px solid #eee;
  text-align: right;
}

.ustax-result__table td:first-child { text-align: left; }

.ustax-result__total td {
  font-weight: 600;
  border-top: 2px solid #ddd;
  background: #fafafa;
}

.ustax-result__net td {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a7a1a;
}

.ustax-result__marginal {
  padding: 0.625rem 1.5rem;
  margin: 0;
  font-size: 0.85rem;
  color: #666;
  background: #fafafa;
  border-top: 1px solid #eee;
}

.ustax-error {
  padding: 1rem 1.5rem;
  color: #c00;
  background: #fff0f0;
  margin: 0;
}

/* Comparison table */
.ustax-cmp-scroll {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.ustax-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 420px;
}

.ustax-cmp-table th,
.ustax-cmp-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #eee;
  text-align: right;
  white-space: nowrap;
}

.ustax-cmp-table thead th {
  background: #0073aa;
  color: #fff;
  font-weight: 600;
}

.ustax-cmp-table th:first-child,
.ustax-cmp-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #f7f7f7;
  font-weight: 600;
}

.ustax-cmp-table thead th:first-child { background: #005177; }

.ustax-cmp-table .ustax-cmp-total td {
  font-weight: 600;
  border-top: 2px solid #ddd;
  background: #fafafa;
}

.ustax-cmp-table .ustax-cmp-total td:first-child { background: #f0f0f0; }

.ustax-cmp-table .ustax-cmp-net td { font-weight: 700; color: #1a7a1a; }

.ustax-cmp-table .ustax-cmp-rate td { color: #555; font-style: italic; }

/* Static / SEO table */
.ustax-static__title { margin: 0 0 0.5rem; }

.ustax-static .ustax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ustax-static .ustax-table caption {
  font-weight: 600;
  text-align: left;
  margin-bottom: 0.5rem;
  color: #333;
}

.ustax-static .ustax-table th,
.ustax-static .ustax-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.ustax-static .ustax-table td { text-align: right; }

.ustax-static .ustax-row--total th,
.ustax-static .ustax-row--total td {
  font-weight: 700;
  border-top: 2px solid #ccc;
}

.ustax-static .ustax-row--net th,
.ustax-static .ustax-row--net td {
  font-weight: 700;
  color: #1a7a1a;
  font-size: 1.05rem;
}
