/* Accessibility and responsive additions from the 2026 site audit. */
a:visited {
  color: #551a8b;
}

#menu a:visited,
.navbar a:visited {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ffbf47 !important;
  outline-offset: 2px;
}

.source-note {
  padding: 10px 12px;
  border-right: 4px solid #3f7f00;
  background: #f5f9f0;
  line-height: 1.55;
}

.calc-error {
  color: #8b0000;
  font-weight: bold;
}

.taxLevels,
.salary-table {
  max-width: 100%;
}

/* Legacy tax-table CSS only targets td. Match that design for semantic th cells. */
.taxLevels th {
  vertical-align: middle;
  border: 1px solid #3f7f00;
  border-width: 0 1px 1px 0;
  padding: 7px;
  color: #000;
  font: normal 14px Arial, sans-serif;
  text-align: right;
}

.taxLevels thead th {
  border-width: 0 0 1px 1px;
  border-right-width: 1px;
  background: linear-gradient(to bottom, #5fbf00 5%, #3f7f00 100%);
  color: #fff;
  font-weight: bold;
  text-align: center;
}

.taxLevels thead th:first-child {
  border-left-width: 0;
}

.taxLevels tbody tr:last-child th {
  border-bottom-width: 0;
}

/* A separate thead resets :first-child and nth-child inside tbody. Restore the
   legacy table's data-row colors and prevent row 1 from inheriting header CSS. */
.taxLevels thead + tbody tr:nth-child(odd) {
  background-color: #fff;
}

.taxLevels thead + tbody tr:nth-child(even) {
  background-color: #d4ffaa;
}

.taxLevels thead + tbody tr:first-child td {
  border-width: 0 1px 1px 0;
  background: transparent;
  color: #000;
  font-weight: normal;
  text-align: right;
}

@media (max-width: 640px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  #main,
  #sent {
    box-sizing: border-box;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Bootstrap's collapsed navigation sits inside the legacy white desktop menu.
   Give mobile links their own readable surface, including already-visited links. */
@media (max-width: 767px) {
  #menu .navbar-default .navbar-collapse {
    border-color: #d7d7d7;
    background-color: #fff;
  }

  #menu .navbar-default .navbar-nav {
    margin: 0 -15px;
  }

  #menu .navbar-default .navbar-nav > li > a,
  #menu .navbar-default .navbar-nav > li > a:visited {
    border-bottom: 1px solid #e5e5e5;
    background-color: #fff;
    color: #333;
    font-weight: bold;
    line-height: 20px;
    padding: 12px 15px;
    text-align: right;
  }

  #menu .navbar-default .navbar-nav > li:last-child > a {
    border-bottom: 0;
  }

  #menu .navbar-default .navbar-nav > li > a:hover,
  #menu .navbar-default .navbar-nav > li > a:focus {
    background-color: #edf5e9;
    color: #111;
  }
}
