.tax1040-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

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

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

.tax1040-card {
  border: 2px solid #F1DFB8;
  border-radius: 14px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.tax1040-card.tax1040-quick-mode {
  border: 2px solid #0b3a6e;
  box-shadow: 0 20px 30px rgba(11, 58, 110, 0.15);
  align-self: flex-start;
}

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

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

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

.tax1040-header h2 {
  margin: 0;
  color: #0a274f;
  font-size: 1.3rem;
  font-weight: 800;
}

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

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

.tax1040-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1b2f46;
  margin-bottom: 6px;
}

.tax1040-field input,
.tax1040-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #C9A646;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: transparent;
  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: 20px;
}

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

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

.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: 2px solid #0b3a6e;
  padding: 26px;
  margin-top: 28px;
}

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

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

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

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

.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: 24px;
}

.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: 32px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0b3a6e;
}

.tax1040-accordion {
  border: 2px solid #F1DFB8;
  border-radius: 14px;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  margin-top: 18px;
  width: 100%;
}

.tax1040-accordion summary {
  cursor: pointer;
  font-weight: 800;
  color: #0a274f;
  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 #C9A646;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: transparent;
  color: #0a274f;
}

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

.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 #ead39a;
  border-radius: 12px;
  padding: 16px;
  background: #fbf7ed;
}

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

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-weight: 600;
  color: #1b2f46;
}

.result-line span {
  font-weight: 800;
  color: #0a274f;
}

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

.tax1040-table th,
.tax1040-table td {
  border: 1px solid #C9A646;
  padding: 12px 18px;
  text-align: left;
}

.tax1040-table th {
  background: #f4e2b7;
  color: #4a3706;
  font-weight: 800;
}

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

.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: #f9f3e3;
  border: 1px solid #ead39a;
  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;
  }
}
