.tax1040-wrapper {
  max-width: 1020px;
  margin: 0 auto;
  padding: 26px 20px 70px;
}

.tax1040-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.tax1040-top-row .tax1040-card {
  flex: 1;
  min-width: 320px;
  width: auto;
}

.tax1040-card {
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  width: 100%;
}

.tax1040-card.tax1040-quick-mode {
  border: 1px solid #dbe4ee;
  align-self: flex-start;
}

.tax1040-optional {
  font-size: 0.85rem;
  font-style: italic;
  color: #2b4060;
  margin-left: 8px;
}

.tax1040-card + .tax1040-card {
  margin-top: 14px;
}

.tax1040-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tax1040-header h2 {
  margin: 0;
  color: #10233c;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tax1040-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px 16px;
}

.tax1040-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.tax1040-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #23405f;
  margin-bottom: 6px;
}

.tax1040-field input,
.tax1040-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.95rem;
  background: #fff;
  color: #0a274f;
}

.tax1040-field small {
  display: block;
  margin-top: 6px;
  color: #6a7786;
  font-size: 0.82rem;
}

.tax1040-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.tax1040-actions-right {
  justify-content: flex-end;
  margin-top: 12px;
}

.tax1040-actions-standard {
  margin-top: 22px;
}

.tax1040-actions .btn-gold {
  background: #f6cc6d;
  color: #071425;
  border: 2px solid #c6931f;
}

.tax1040-actions .btn-outline {
  background: #1b4a8f;
  border: 2px solid #143c76;
  color: #fff;
}

.tax1040-results-wrapper {
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 20px;
  margin-top: 22px;
  background: #fff;
}

.tax1040-results-intro {
  margin: 0 0 16px;
  max-width: 640px;
  color: #4f6175;
  line-height: 1.5;
}

.tax1040-highlight-box {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tax1040-highlight-box span {
  font-size: 1rem;
  font-weight: 700;
  color: #17314d;
}

.tax1040-highlight-box strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: #10233c;
}

.tax1040-highlight-box.is-due {
  background: #fff;
  border-color: #d8b0a4;
}

.tax1040-highlight-box.is-due span,
.tax1040-highlight-box.is-due strong {
  color: #7c1f16;
}

#summary-refund-line.is-due span {
  color: #7c1f16;
  font-weight: 800;
}

.tax1040-results-grid {
  gap: 14px;
}

.results-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

.tax1040-results-actions {
  justify-content: center;
  gap: 12px;
  display: flex;
  margin-top: 18px;
}

.tax1040-quick-checkbox {
  margin-top: 16px;
  font-weight: 600;
}

.tax1040-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1b2f46;
  font-size: 0.95rem;
}

.table-title {
  margin-top: 24px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0b3a6e;
}

.tax1040-accordion {
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #fff;
  padding: 10px 14px;
  margin-top: 14px;
  width: 100%;
}

.tax1040-accordion summary {
  cursor: pointer;
  font-weight: 700;
  color: #10233c;
  font-size: 1.05rem;
  list-style: none;
}

.tax1040-accordion summary::-webkit-details-marker {
  display: none;
}

.tax1040-accordion-body {
  margin-top: 12px;
}

.tax1040-input-table {
  margin-top: 0;
}

.tax1040-input-table th {
  width: 45%;
}

.tax1040-input-table td input,
.tax1040-input-table td select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.95rem;
  background: #fff;
  color: #0a274f;
}

.tax1040-input-table tbody tr:nth-child(odd) th,
.tax1040-input-table tbody tr:nth-child(odd) td {
  background: #fbfcfe;
}

.tax1040-input-table tbody tr:nth-child(even) th,
.tax1040-input-table tbody tr:nth-child(even) td {
  background: #fff;
}

.tax1040-toggle {
  margin: 6px 0 12px;
}

.tax1040-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #1b2f46;
}

.tax1040-note {
  margin: 0 0 10px;
  color: #2b4060;
  font-size: 0.9rem;
}

.tax1040-disclaimer {
  margin: 20px auto 10px;
  max-width: 960px;
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: #6a7786;
}

.btn-blue-bright {
  background: #2a63bf;
  color: #fff;
  border: 2px solid #2456a8;
}

.tax1040-error {
  margin-top: 12px;
  color: #7a2f2f;
  font-weight: 600;
}

.tax1040-results {
  margin-top: 18px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.result-card {
  border: 1px solid #dce6f0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.result-card h3 {
  margin: 0 0 8px;
  color: #10233c;
  font-size: 1.05rem;
  font-weight: 700;
}

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-weight: 600;
  color: #36516f;
  border-bottom: 1px solid #eef3f8;
}

.result-line span {
  font-weight: 700;
  color: #10233c;
}

.result-card .result-line:last-child {
  border-bottom: 0;
}

.tax1040-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95rem;
}

.tax1040-table th,
.tax1040-table td {
  border: 1px solid #dde6ef;
  padding: 11px 16px;
  text-align: left;
}

.tax1040-table th {
  background: #f8fafc;
  color: #17314d;
  font-weight: 700;
}

.tax1040-table tbody tr:nth-child(odd) td {
  background: #fcfdff;
}

.tax1040-table tbody tr:nth-child(even) td {
  background: transparent;
}


.tax1040-table td:last-child,
.tax1040-table th:last-child {
  text-align: right;
}

.tax1040-notes {
  margin-top: 16px;
  background: #f7fafc;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.tax1040-notes h4 {
  margin: 0 0 8px;
  color: #0a274f;
  font-weight: 800;
}

.tax1040-notes ul {
  margin: 0;
  padding-left: 18px;
  color: #1b2f46;
}

@media (max-width: 900px) {
  .tax1040-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .tax1040-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tax1040-accordion {
    padding: 12px;
  }
}
